Ctrl K
Problem

Find in a Sorted List

Easy · Find in a Sorted List

An archive keeps a list of record numbers `ids`, sorted in ascending order with no repeats. You need to find where the number `wanted` is stored. Return the index of `wanted` in `ids` (0-based), or `-1` if it is not there. Scanning the whole list is too slow: your solution must run in O(log n).…

Solve the problem →