Update 4_Silver_BinSearch.md

This commit is contained in:
nchn27 2020-06-05 19:11:34 -04:00 committed by GitHub
parent 6053570abd
commit 5f603cfb03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)