coding a binary search, which is a little nontrivial because you have to think carefully to avoid off-by-one errors
Half-open ranges are your friend :-)
Half-open ranges are your friend :-)