Skip to main content

Series

Binary Search: No Memorizing, No Crying

Binary search is easy to explain and weirdly hard to write. One solution uses low <= high, another uses low < high, and nobody tells you why. This series builds the 5 patterns from scratch so you can rebuild any version yourself, even at 2 AM. No memorizing, no crying.

Posts in this series