Binary Search
Use left and right pointers, compute the middle index, and discard half the range each step based on the comparison.
Given a sorted list and a target, return the target index or -1 if it is missing.
Use left and right pointers, compute the middle index, and discard half the range each step based on the comparison.
Use left and right pointers, compute the middle index, and discard half the range each step based on the comparison.
Given a sorted list and a target, return the target index or -1 if it is missing.