Lecture Outline
- Binary search is an efficient algorithm for searching for a value in a sorted data structure
- Binary search leverages the fact that the array is sorted and computes the mid point of the array, and narrows the search to left section or right section
- Running time of binary search is O(logn), because you eliminate half of the array each time you iterate
Lecture Recording
Lecture Slides
Code