Search
⌘K

Leetcode 1095. Find in Mountain Array

Given a mountain (strictly increasing then strictly decreasing) array accessible only via a limited-call MountainArray interface, return the smallest index where the value equals target or -1 if absent. The challenge is to minimize get calls (<=100) by first locating the peak and then binary-searching the increasing and decreasing halves.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.