Brainscape
Find Flashcards
Discover millions of Flashcards
Browse Brainscape-Certified Flashcards
Learn faster with our catalog of expert certified, pre-made flashcards.
Browse All Flashcards
Browse our full catalog of user-generated and Brainscape-Certified flashcards.
Explore the
Knowledge Genome
of subjects:
Entrance Exams
Professional Certifications
Foreign Languages
Medical & Nursing
Science
English
Humanities & Social Studies
Mathematics
Law
Vocations
Health & Fitness
Business & Finance
Technology & Engineering
Food & Beverage
Fine Arts
Random Knowledge
Make Flashcards
How It Works
Features Overview
The Science of Studying
Educators
Schools & Teachers
Tutors & Resellers
Businesses
Employee Training
Publishers & Resellers
Academy
Academy Homepage
The Science of Studying
Study Tips
Teaching Tips
Employee Training Tips
Language Learning Tips
Test Prep Tips
Log in
My Dashboard
Get Started
Log out
Medium
> Find Peak Element > Flashcards
Find Peak Element Flashcards
(1 cards)
Study These Flashcards
1
Q
Find Peak Element
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[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 num[-1] = num[n] = -∞.
For example, in array [1, 2, 3, 1], 3 is a peak element and your function should return the index number 2.
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
Medium
flashcards
Decks in class (93)
# Cards
Longest Substring Without Repeating Characters
1
Container With Most Water
1
Longest Palindromic Substring
1
Add Two Numbers
1
Sort List
1
Product of Array Except Self
1
3Sum
1
Odd Even Linked List
1
Word Break
1
Pow(x, n)
1
Letter Combinations of a Phone Number
1
Number of Islands
1
Copy List with Random Pointer
1
Generate Parentheses
1
Group Anagrams
1
Maximum Product Subarray
1
Evaluate Reverse Polish Notation
1
Shuffle an Array
1
Rotate Image
1
String to Integer (atoi)
1
Largest Number
1
Merge Intervals
1
Search in Rotated Sorted Array
1
Valid Sudoku
1
Permutations
1
Find the Duplicate Number*
1
Word Search
1
Spiral Matrix
1
Top K Frequent Elements
1
Game of Life
1
Divide Two Integers
1
Search a 2D Matrix II
1
Perfect Squares
1
Remove Nth Node From End of List
1
Set Matrix Zeroes
1
Find Peak Element
1
Gas Station
1
Word Ladder
1
Lowest Common Ancestor of a Binary Tree
1
Populating Next Right Pointers in Each Node
1
Unique Paths
1
Kth Largest Element in an Array
1
Binary Tree Level Order Traversal
1
Jump Game
1
Construct Binary Tree from Preorder and Inorder Traversal
1
Subsets
1
Subsets II
1
Fraction to Recurring Decimal
1
Sort Colors
1
Longest Substring with At Least K Repeating Characters
1
Decode Ways
1
Increasing Triplet Subsequence
1
Implement Trie (Prefix Tree)
1
Flatten 2D Vector
1
Binary Tree Inorder Traversal
1
Kth Smallest Element in a Sorted Matrix
1
Find the Celebrity
1
Insert Delete GetRandom O(1)
1
Validate Binary Search Tree
1
Flatten 2D Vector
1
Surrounded Regions
1
Course Schedule
1
Meeting Rooms II
1
Basic Calculator II
1
Palindrome Partitioning
1
Search for a Range
1
Kth Smallest Element in a BST
1
Wiggle Sort II
1
Binary Tree Zigzag Level Order Traversal
1
Inorder Successor in BST
1
Missing Ranges
1
4Sum II
1
Design Tic-Tac-Toe
1
Course Schedule II
1
Best Time to Buy and Sell Stock with Cooldown
1
Combination Sum
1
Combination Sum IV
1
Combination Sum III
1
Counting Bits
1
114. Flatten Binary Tree to Linked List
1
Friend Circles
1
Linked List Cycle II
1
Maximal Square
1
Partition Equal Subset Sum
1
Queue Reconstruction by Height
1
Single Element in a Sorted Array
1
Subarray Sum Equals K
1
Target Sum
1
Minimum Height Trees
1
Unique Binary Search Trees
1
House Robber II
1
House Robber III
1
Decode String
1