Find Peak Element
Google Interview Question
Problem Overview
Difficulty: Medium
LeetCode Pattern: Binary Search
Given a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks.
Note: A peak element is an element that is strictly greater than its neighbors.
Input:
· nums = [1,2,3,1]
Output:
· 2Input:
· nums = [1…Keep reading with a 7-day free trial
Subscribe to Harpreet's Newsletter to keep reading this post and get 7 days of free access to the full post archives.

