Search⌘ K
AI Features

Find Peak Element

Find Peak Element asks you to return the index of any array element strictly greater than its immediate neighbors, with positions beyond both ends treated as negative infinity, in logarithmic time.

Statement

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