How binary search works, why it's correct, and how to implement it without off-by-one bugs. Includes an interactive step-through.