Search⌘ K
AI Features

Find Peak Element

Find Peak Element asks you to return any index whose value is greater than its immediate neighbors in an integer array, including virtual negative-infinity boundaries, in logarithmic time.

Statement

You’re given a 0-indexed integer array nums. An index i is called a peak if ...