Data structures · Searching and hashing

Writing binary search

Binary search is twelve lines long, and most bugs in it hide in two of them: the loop test and the moves of the bounds.