Binary Search
374. Guess Number Higher or Lower
A number is hidden in [1, n], and a guess(num) API tells you whether your pick is too high, too low, or exact. Find it in the fewest calls. The range is sorted by construction and the API hands you a…
Loading…