Binary Search operates on a contiguous sequence with a specified left and right index. This is called the Search Space
Binary Search maintains the left, right, and middle indicies of the search space and compares the search target or applies the search condition to the middle value of the collection
If the condition is unsatisfied or values unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful
If the search ends with an empty half, the condition cannot be fulfilled and target is not found
You Will Know
Three Parts of a Successful Binary Search
Three kinds of an Implementation
Why Should You Learn These
Contents
Click cmd/ctrl + option/alt + T to expand all toggles