LeetCode 1095: Find in Mountain Array
A clear explanation of finding a target in a mountain array using three binary searches on the interface API.
7 notes
A clear explanation of finding a target in a mountain array using three binary searches on the interface API.
A clear explanation of the Guess the Word interactive problem using candidate filtering and minimax-style guessing.
A clear explanation of searching in a sorted array when the array length is hidden behind an ArrayReader interface.
A binary search solution for finding the first bad version while minimizing calls to the isBadVersion API.
A two-pass solution for finding a celebrity using the knows API with O(n) calls and O(1) extra space.
A clear explanation of implementing read with read4 when read may be called multiple times.
A clear explanation of implementing read using the given read4 API and copying only the needed characters.