Binary Search
After you are familiar with linear search, a faster searching algorithm is the natural next step, and binary search provides just that. In learning about binary search, you will discover an algorithm whose speed can be leaps and bounds better than linear search, but not without a cost–the data must be sorted first. In this section, you will learn about the binary search algorithm, its efficiencies and inefficiencies, and more.
-
Lecture
-
Shorts
-
Notes
-
Thought Questions
- Under which conditions is it more efficient to use binary search versus linear search on a set of data?
- Under which conditions is it more efficient to use linear search versus binary search?
- Why is binary search an O(log n) algorithm?
- How many steps, maximally, does it takes to run binary search on a (sorted) data set of size 64? 4096? 4,294,967,296?