Harpreet's Newsletter

Harpreet's Newsletter

Find Peak Element

Google Interview Question

Harpreet Singh's avatar
Harpreet Singh
Nov 10, 2025
∙ Paid

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:
· 2
Input:
· 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.

Already a paid subscriber? Sign in
© 2025 Harpreet Singh · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture