List2: Binary Search¶
Introduction to Binary Search¶
Binary search is the search technique that works efficiently on sorted lists. Hence, to search an element into some list using the binary search technique, we must ensure that the list is sorted.
Binary search follows the divide and conquer approach in which the list is divided into two halves, and the item is compared with the middle element of the list. If the match is found then, the location of the middle element is returned. Otherwise, we search into either of the halves depending upon the result produced through the match.
Short Video Lecture¶
(Video here)
VisualCodeChat Tutoring¶
Interact and Learn with VisualCodeChat!
After-class Exercises¶
(Exercises here)