No array to index — only an API isBadVersion(v). Versions are monotonic:
once one version is bad, every later version is bad too. Binary search for the
first bad version by treating “good → bad” as the boundary to find.
Execution
idle
Press Run to begin.
0 / 0
Speed
Java · running line
leftmidrightgood (API)bad (API)first bad
O(log n) API calls · O(1) space · when mid is bad keep it (right = mid); when good, left = mid + 1.