leetcode
Here are 836 public repositories matching this topic...
-
Updated
Oct 21, 2020 - Python
-
Updated
Aug 11, 2019 - Python
-
Updated
Oct 23, 2019 - Python
-
Updated
Oct 18, 2020 - Python
-
Updated
Oct 3, 2020 - Python
-
Updated
Oct 4, 2020 - Python
-
Updated
Nov 9, 2020 - Python
-
Updated
Oct 31, 2020 - Python
-
Updated
Jul 25, 2019 - Python
-
Updated
Aug 7, 2019 - Python
-
Updated
Oct 23, 2020 - Python
-
Updated
Dec 30, 2019 - Python
-
Updated
Nov 16, 2020 - Python
-
Updated
Sep 2, 2020 - Python
-
Updated
Nov 18, 2020 - Python
-
Updated
Oct 10, 2018 - Python
-
Updated
Mar 1, 2020 - Python
-
Updated
Sep 14, 2018 - Python
-
Updated
Nov 27, 2020 - Python
-
Updated
Oct 30, 2020 - Python
Improve this page
Add a description, image, and links to the leetcode topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the leetcode topic, visit your repo's landing page and select "manage topics."
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: