Binary search without the off-by-one guesswork
Binary search is easy to explain and easy to get wrong. left <= right or left < right? mid or mid + 1? Return left or right?
Here's my first attempt at LeetCode 981: Time Based Key-Value Store, which
basecase-utkarsh.hashnode.dev3 min read