Problem 33 · Medium
Binary search with extra checks: determine which half is sorted, then decide which side the target is in.
Open the interactive visualisation