Binary Search — The Algorithm You Underestimate Every Single Day

Four lines of code, and Java shipped them broken in the standard library for eight years. The idea was never the hard part.