diff --git a/content/2_Silver/4_Silver_BinSearch.md b/content/2_Silver/4_Silver_BinSearch.md index b6d26e9..32829c9 100644 --- a/content/2_Silver/4_Silver_BinSearch.md +++ b/content/2_Silver/4_Silver_BinSearch.md @@ -16,9 +16,15 @@ Binary search can be used on monotonic functions for a logarithmic runtime. Find an element in a sorted array in O(log N) time. ### Tutorial - - [GeeksForGeeks](https://www.geeksforgeeks.org/binary-search/) - [Wikipedia](https://en.wikipedia.org/wiki/Binary_search_algorithm) +### Library Functions to do Binary Search: +#### Java + - [Arrays.binarySearch](https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html) + - [Collections.binarySearch](https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html) +#### C++ + - [lower_bound](http://www.cplusplus.com/reference/algorithm/lower_bound/) + - [upper_bound](http://www.cplusplus.com/reference/algorithm/upper_bound/) ### Problems - [USACO Silver Counting Haybales](http://www.usaco.org/index.php?page=viewproblem2&cpid=666)