Update 4_Silver_BinSearch.md
This commit is contained in:
parent
6053570abd
commit
5f603cfb03
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Reference in a new issue