Skip to content
#

leetcode

Here are 836 public repositories matching this topic...

The official repository for our programming kitchen which consists of 50+ delicious programming recipes having all the interesting ingredients ranging from dynamic programming, graph theory, linked lists and much more. All the articles contain beautiful images and some gif/video at times to help clear important concepts.

  • Updated Aug 7, 2019
  • Python
adityaarakeri
adityaarakeri commented Oct 7, 2020

Description of the Problem

Find a Peak Element

A peak element is an element that is greater than its neighbors.
Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.
The array may contain multiple peaks, in that case return the index to any one of the peaks is fine.
You may imagine that nums[-1] = nums[n] = -∞.
Example 1:

Input: nums = 

Improve this page

Add a description, image, and links to the leetcode topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the leetcode topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.