Java · 2D arrays, searching and sorting
When the values are in order, one comparison can rule out half of them, and a million values take twenty steps.