Interactive
LeetCode 374: Guess Number Higher or Lower
·1 min
LeetCode
Easy
Binary-Search
Interactive
LeetCode 374 note: adjust the range by guess’s result, where -1 means the guess is too high and 1 too low
LeetCode 278: First Bad Version
·1 min
LeetCode
Easy
Binary-Search
Interactive
LeetCode 278 note: find the first version where isBadVersion is True with a lower-bound binary search, calling the API O(log n) times