Imagine doing a search and picking one item from a group. Let’s say that that item isn’t a match. Because it’s not a match, you now know that half of the items in that group also don’t match (because the group is sorted).
So, you start a search again but on the other half. Pick an item, does it match? If yes, great. If not, you can now eliminate half of the items in *that* group. Since you eliminated half of the group you originally started with and half of the sub-group, you’re now down to 1/4 of the original group.
Each search reduces the possibilities by half, making a binary tree search very efficient.
Latest Answers