Interview Prep
Pick a company to see the most frequently asked LeetCode questions. Click any question to jump straight to the problem statement on LeetCode.
Found this helpful?
Tap to let us know. No login required.
Contains Duplicate
Merge Intervals
Two Sum
Two Sum
Two Sum
Valid Word Abbreviation
Add Two Numbers
Best Time to Buy and Sell Stock
Binary Tree Vertical Order Traversal
Logger Rate Limiter
Longest Substring Without Repeating Characters
Valid Anagram
Contains Duplicate
Longest Common Prefix
LRU Cache
Minimum Remove to Make Valid Parentheses
Reconstruct Itinerary
Two Sum
Group Anagrams
Median of Two Sorted Arrays
Nested List Weight Sum
Product of Array Except Self
Time Based Key-Value Store
Trapping Rain Water
Add Two Numbers
Cache With Time Limit
Lowest Common Ancestor of a Binary Tree III
Maximum Subarray
Palindrome Number
Top K Frequent Elements
Best Time to Buy and Sell Stock
Buildings With an Ocean View
Contains Duplicate III
Longest Palindromic Substring
Maximum Product Subarray
Product of Array Except Self
Container With Most Water
Dot Product of Two Sparse Vectors
Find Minimum in Rotated Sorted Array
Meeting Rooms II
Trapping Rain Water
Valid Sudoku
Encode and Decode Strings
Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Number of Islands
Search in Rotated Sorted Array
Valid Palindrome II
3Sum
Count Number of Trapezoids II
Course Schedule II
Longest Common Prefix
Longest Consecutive Sequence
Random Pick with Weight
Basic Calculator II
Best Time to Buy and Sell Stock
Container With Most Water
Contains Duplicate II
Count Number of Trapezoids I
Valid Palindrome
3Sum
Container With Most Water
Kth Largest Element in an Array
Sum of Two Integers
Two Sum II
3Sum
3Sum
Group Anagrams
Number of 1 Bits
Simplify Path
Container With Most Water
Counting Bits
Koko Eating Bananas
Longest Palindromic Substring
Range Sum of BST
Longest Consecutive Sequence
Median of Two Sorted Arrays
Missing Number
Trapping Rain Water
Valid Number
Best Time to Buy and Sell Stock
Custom Sort String
Meeting Rooms II
Reverse Bits
Valid Parentheses
Climbing Stairs
Longest Substring Without Repeating Characters
Lowest Common Ancestor of a Binary Tree
Reorganize String
Reverse Integer
Coin Change
Longest Repeating Character Replacement
Merge Intervals
Roman to Integer
Stickers to Spell Word
Longest Increasing Subsequence
Maximum Swap
Palindrome Number
Permutation in String
Subarray Sum Equals K
Convert Binary Search Tree to Sorted Doubly Linked List
Longest Common Subsequence
Longest Consecutive Sequence
Maximum Subarray
Minimum Window Substring
Merge Intervals
Sliding Window Maximum
Sum Root to Leaf Numbers
Word Break Problem
Minimum Add to Make Parentheses Valid
Valid Parentheses
Min Stack
Moving Average from Data Stream
Evaluate Reverse Polish Notation
Insert into a Sorted Circular Linked List
Generate Parentheses
Group Shifted Strings
Daily Temperatures
Find Peak Element
Car Fleet
Pow(x n )
Largest Rectangle in Histogram
Merge Intervals
Binary Search
K Closest Points to Origin
Search a 2D Matrix
Shortest Path in Binary Matrix
Koko Eating Bananas
Making A Large Island
Binary Tree Right Side View
Remove Invalid Parentheses
Next Permutation
Toeplitz Matrix
Diameter of Binary Tree
Vertical Order Traversal of a Binary Tree
Valid Palindrome III
Copy List with Random Pointer
Diagonal Traverse
Closest Binary Search Tree Value
LRU Cache
Add Strings
Move Zeroes
Subarray Sum Equals K
Word Search
Summary Ranges
Top K Frequent Elements
Network Delay Time
LRU Cache
Contains Duplicate
Random Pick with Weight
Course Schedule
Combination Sum IV
Majority Element
Roman to Integer
House Robber
Maximum Subarray
Valid Parentheses
House Robber II
Merge Two Sorted Lists
Word Search
Decode Ways
Majority Element
Remove Duplicates from Sorted Array
Number of Visible People in a Queue
Subarray Sum Equals K
Unique Paths
Jump Game
Merge k Sorted Lists
Search in Rotated Sorted Array
Clone Graph
Merge Sorted Array
Search in Rotated Sorted Array
Course Schedule
Decode String
Top K Frequent Elements
Letter Combinations of a Phone Number
Pacific Atlantic Water Flow
Reverse Linked List
Merge Two Sorted Lists
Number of Islands
Top K Frequent Elements
Create Hello World Function
Find Minimum in Rotated Sorted Array
Generate Parentheses
Longest Consecutive Sequence
Alien Dictionary (Leetcode Premium)
N-Queens
Search in Rotated Sorted Array
Single Number
Combine Two Tables
Graph Valid Tree (Leetcode Premium)
Pascal's Triangle
Time Based Key-Value Store
Find Peak Element
Happy Number
Median of Two Sorted Arrays
Number of Connected Components in an Undirected Graph (Leetcode Premium)
Insert Interval
Lowest Common Ancestor of a Binary Tree
Move Zeroes
Reverse Linked List
Find the Index of the First Occurrence in a String
Merge Intervals
Merge Two Sorted Lists
Rotting Oranges
Copy List with Random Pointer
Next Permutation
Non-overlapping Intervals
Reorder List
Meeting Rooms (Leetcode Premium)
Pascal's Triangle
Remove Duplicates from Sorted Array
Remove Nth Node From End of List
Climbing Stairs
Copy List with Random Pointer
Meeting Rooms II (Leetcode Premium)
Next Permutation
Add Two Numbers
Binary Search
Linked List Cycle
Find the Duplicate Number
LRU Cache
Merge K Sorted Lists
3Sum
Reverse Nodes in k-Group
Design Tic-Tac-Toe
Invert Binary Tree
Interval List Intersections
Maximum Depth of Binary Tree
Diameter of Binary Tree
Merge Sorted Array
Balanced Binary Tree
Valid Palindrome
Random Pick Index
Same Tree
Subtree of Another Tree
Word Break II
Lowest Common Ancestor of a BST
Number of Islands
Binary Tree Level Order Traversal
Shortest Distance from All Buildings
Binary Tree Right Side View
Merge k Sorted Lists
Accounts Merge
Count Good Nodes in Binary Tree
All Nodes Distance K in Binary Tree
Validate Binary Search Tree
Continuous Subarray Sum
Kth Smallest Element in a BST
Check if an Original String Exists Given Two Encoded Strings
Construct Binary Tree from Preorder and Inorder
Binary Tree Maximum Path Sum
Exclusive Time of Functions
Count and Say
Serialize and Deserialize Binary Tree
Maximum Sum of 3 Non-Overlapping Subarrays
Minimum Insertions to Balance a Parentheses String
Missing Ranges
Clone Graph
Max Consecutive Ones III
Diagonal Traverse II
Kth Smallest Element in a Sorted Matrix
Task Scheduler II
Longest Increasing Path in a Matrix
Friends Of Appropriate Ages
Range Sum Query 2D - Immutable
Count Nodes Equal to Average of Subtree
Expression Add Operators
Find First and Last Position of Element in Sorted Array
Alien Dictionary
Remove All Adjacent Duplicates In String
Serialize and Deserialize N-ary Tree
Word Search II
Minesweeper
Smallest Subtree with all the Deepest Nodes
Remove All Adjacent Duplicates in String II
Flatten Binary Tree to Linked List
Construct Binary Tree from String
The Maze
Number of Substrings Containing All Three Characters
Valid Parentheses
First Missing Positive
Word Break
Flatten Nested List Iterator
Daily Temperatures
Koko Eating Bananas
Best Time to Buy and Sell Stock
Majority Element
Merge Sorted Array
Reverse a Linked List
Concatenation of Array
Detect Cycle in a Linked List
Valid Anagram
Add Two Integers
Fruit Into Baskets
Merge Two Sorted Lists
First Missing Positive
Merge K Sorted Lists
Spiral Matrix
Minimum Window Substring
Recyclable and Low Fat Products
Remove Nth Node From End Of List
Binary Tree Maximum Path Sum
Generate Parentheses
Reorder List
Add Binary
Product of Array Except Self
Set Matrix Zeroes
Climbing Stairs
Contains Duplicate
Spiral Matrix
Rotate Image
Split Array Largest Sum
Subsets
House Robber
Largest Rectangle in Histogram
Word Search
4Sum
Longest Substring Without Repeating Characters
Rotate Array
Longest Repeating Character Replacement
Meeting Rooms II
Remove Element
House Robber
Minimum Window Substring
Rotate Array
Plus One
Sliding Window Maximum
Valid Anagram
Find Median from Data Stream
Group Anagrams
Set Matrix Zeroes
Serialize and Deserialize Binary Tree
Valid Palindrome
Valid Parentheses
Min Stack
Russian Doll Envelopes
Valid Palindrome
Coin Change
Longest Palindromic Substring
Merge Strings Alternately
Diameter of Binary Tree
Palindromic Substrings
Search Insert Position
Encode and Decode Strings (Leetcode Premium)
Group Anagrams
Permutations
Jump Game
Maximum Depth of Binary Tree
Word Ladder
Implement Trie
Same Tree
Single Number
Add and Search Word
Invert/Flip Binary Tree
Reverse Linked List
Longest Increasing Subsequence
Word Search II
Fibonacci Number
Kth Largest Element in a Stream
Daily Temperatures
Last Stone Weight
K Closest Points to Origin
Middle of the Linked List
Top K Frequent Elements
Concatenation of Array
Kth Largest Element in an Array
Verifying an Alien Dictionary
Letter Combinations of a Phone Number
Running Sum of 1d Array
Task Scheduler
Add Two Integers
Best Meeting Point
Design Twitter
Find Median from Data Stream
Meeting Rooms II
Number of Zero-Filled Subarrays
Binary Search Tree Iterator
Subsets
Combination Sum
Minimum Window Substring
Permutations
Product of Two Run-Length Encoded Arrays
Sliding Window Median
Subsets II
Combination Sum II
Rank Transform of an Array
Course Schedule
Word Search
Max Area of Island
Palindrome Partitioning
Capacity To Ship Packages Within D Days
Letter Combinations of a Phone Number
N-Queens
Kth Missing Positive Number
Number of Islands
Clone Graph
Max Area of Island
Pacific Atlantic Water Flow
Surrounded Regions
Rotting Oranges
Walls and Gates
Course Schedule
Course Schedule II
Redundant Connection
Number of Connected Components
Subsets
Reconstruct Itinerary
Valid Square
Word Break
Balance a Binary Search Tree
Maximum Level Sum of a Binary Tree
Coin Change
Sum of Square Numbers
Top K Frequent Words
All Paths From Source to Target
Fruit Into Baskets
Sort Colors
Largest Rectangle in Histogram
Binary Tree Maximum Path Sum
LRU Cache
Binary Tree Level Order Traversal
Number of Islands
N-Queens
Serialize and Deserialize Binary Tree
Sqrt(x)
Subtree of Another Tree
Construct Binary Tree from Preorder and Inorder Traversal
Product of Array Except Self
Sort an Array
Validate Binary Search Tree
Kth Smallest Element in a BST
Regular Expression Matching
Lowest Common Ancestor of a Binary Search Tree
Rotate Image
Find Peak Element
Implement Trie (Prefix Tree)
Add and Search Word
Power of Two
Sudoku Solver
Word Search II
Insert Interval
Top K Frequent Elements
Find Median from Data Stream
Unique Paths
Maximum Product Subarray
Second Highest Salary
Count Primes
Maximal Square
Valid Anagram
Graph Valid Tree
Word Ladder
Reconstruct Itinerary
Min Cost to Connect All Points
Network Delay Time
Swim in Rising Water
Alien Dictionary
Cheapest Flights Within K Stops
Climbing Stairs
Min Cost Climbing Stairs
House Robber
House Robber II
Longest Palindromic Substring
Palindromic Substrings
Decode Ways
Coin Change
Boundary of Binary Tree
Maximum Product Subarray
Diameter of N-Ary Tree
Word Break
Insert Delete GetRandom O(1)
Longest Increasing Subsequence
Longest Univalue Path
Partition Equal Subset Sum
Missing Element in Sorted Array
Unique Paths
Longest Common Subsequence
Maximum Number of Intersections on the Chart
Number of Squareful Arrays
Stock with Cooldown
Coin Change II
Create Hello World Function
Basic Calculator
Target Sum
Interleaving String
Minimum Depth of Binary Tree
Longest Increasing Path in Matrix
String to Integer (atoi)
Distinct Subsequences
Rectangle Area
Edit Distance
Minimum Time to Collect All Apples in a Tree
Burst Balloons
Word Search
Number of Visible People in a Queue
Check Completeness of a Binary Tree
Palindrome Permutation
Lowest Common Ancestor of a Binary Tree II
Lowest Common Ancestor of Deepest Leaves
Parallel Courses
Snapshot Array
Number of Flowers in Full Bloom
To Be Or Not To Be
Fruit Into Baskets
Next Special Palindrome Number
3Sum Closest
Merge k Sorted Lists
Find First and Last Position of Element in Sorted Array
Two Sum II - Input Array Is Sorted
Course Schedule
Kth Largest Element in an Array
Intersection of Two Arrays
Max Consecutive Ones
Single Element in a Sorted Array
Zigzag Conversion
Letter Combinations of a Phone Number
Jump Game II
Pow(x
Rotate List
Employees Earning More Than Their Managers
Longest Repeating Character Replacement
Find All Numbers Disappeared in an Array
Coin Change II
Regular Expression Matching
Maximum Subarray
Jump Game
Jump Game II
Gas Station
Hand of Straights
Merge Triplets to Form Target Triplet
Partition Labels
Valid Parenthesis String
Insert Interval
Merge Intervals
Non-overlapping Intervals
Meeting Rooms
Meeting Rooms II
Minimum Interval to Include Each Query
Rotate Image
Spiral Matrix
Set Matrix Zeroes
Happy Number
Plus One
Pow(x
Multiply Strings
Detect Squares
Single Number
Number of 1 Bits
Counting Bits
Reverse Bits
Missing Number
Sum of Two Integers
Reverse Integer
We use cookies to improve your experience. By clicking “Accept” you consent to the use of cookies. Read our Privacy Policy.