Medium LeetCode Questions

Medium

1,744 unique questions sorted by company popularity

Top Companies

Questions

TitleCompanies
LRU Cache125
Longest Substring Without Repeating Characters108
Merge Intervals108
Group Anagrams86
Number of Islands85
Longest Palindromic Substring77
Maximum Subarray63
3Sum59
Container With Most Water56
Top K Frequent Elements53
Spiral Matrix52
Search in Rotated Sorted Array52
Rotting Oranges49
Product of Array Except Self44
Kth Largest Element in an Array43
Generate Parentheses43
Course Schedule43
Subarray Sum Equals K42
Koko Eating Bananas42
Meeting Rooms II42
House Robber40
Decode String40
Insert Delete GetRandom O(1)40
Coin Change39
Longest Consecutive Sequence38
String Compression37
Add Two Numbers37
Rotate Image37
Min Stack37
Word Search36
Jump Game36
Course Schedule II36
Letter Combinations of a Phone Number34
Integer to Roman34
Best Time to Buy and Sell Stock II33
Basic Calculator II33
Next Permutation32
Daily Temperatures32
Word Break32
Find Peak Element31
Longest Increasing Subsequence30
Asteroid Collision30
Sort Colors30
Combination Sum30
Reverse Words in a String29
Time Based Key-Value Store29
Find First and Last Position of Element in Sorted Array28
Edit Distance28
Rotate Array27
Jump Game II27
Permutations27
Maximal Square27
Valid Sudoku27
Random Pick with Weight26
Gas Station26
Simplify Path25
Evaluate Division24
Unique Paths23
Decode Ways23
Set Matrix Zeroes23
Task Scheduler23
Implement Trie (Prefix Tree)23
Reverse Integer22
Pow(x, n)22
Search a 2D Matrix22
Design Hit Counter22
Subsets22
Capacity To Ship Packages Within D Days22
Palindromic Substrings22
Find the Duplicate Number22
Copy List with Random Pointer22
Largest Number21
Remove K Digits21
Maximum Product Subarray21
Top K Frequent Words21
Search Suggestions System21
String to Integer (atoi)20
Binary Tree Zigzag Level Order Traversal20
Restore IP Addresses20
Reorganize String20
Zigzag Conversion20
Remove Nth Node From End of List19
Lowest Common Ancestor of a Binary Tree19
Longest Repeating Character Replacement19
Single Element in a Sorted Array19
Search a 2D Matrix II19
Snapshot Array19
4Sum18
Flatten Nested List Iterator18
Binary Tree Level Order Traversal18
Max Area of Island18
Cheapest Flights Within K Stops18
Find Minimum in Rotated Sorted Array18
Multiply Strings18
Non-overlapping Intervals18
Clone Graph18
Evaluate Reverse Polish Notation18
Design Circular Queue18
Longest Common Subsequence17
Max Consecutive Ones III17
Two Sum II - Input Array Is Sorted17
Remove All Adjacent Duplicates in String II17
Subarray Product Less Than K17
Accounts Merge17
Simple Bank System17
Insert Interval17
K Closest Points to Origin17
Validate Binary Search Tree17
Find All Anagrams in a String16
Game of Life16
Shortest Path in Binary Matrix16
Find K Closest Elements16
House Robber II16
Minimum Size Subarray Sum16
Minimum Path Sum16
Count Primes15
Second Highest Salary15
Binary Tree Right Side View15
Combination Sum II15
Open the Lock15
Reverse Linked List II15
Next Greater Element II15
Partition Equal Subset Sum15
Count and Say15
Maximum Number of Events That Can Be Attended15
Design Twitter14
Longest String Chain14
Swap Nodes in Pairs14
Find the Length of the Longest Common Prefix14
Design Memory Allocator14
Shortest Bridge14
Sort Characters By Frequency13
Permutation in String13
Unique Paths II13
Design Tic-Tac-Toe13
All Nodes Distance K in Binary Tree13
Reorder List13
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit13
Design Add and Search Words Data Structure13
Design Browser History13
Furthest Building You Can Reach13
Number of Distinct Islands13
Minimum Knight Moves13
01 Matrix12
Contiguous Array12
Sum of Subarray Minimums12
Amount of Time for Binary Tree to Be Infected12
Valid Parenthesis String12
House Robber III12
Exclusive Time of Functions12
Find the Celebrity12
Snakes and Ladders12
The Maze12
Longest Palindromic Subsequence11
Minimum Cost For Tickets11
Validate IP Address11
Find the Smallest Divisor Given a Threshold11
Robot Bounded In Circle11
3Sum Closest11
Linked List Cycle II11
Interval List Intersections11
Frequency of the Most Frequent Element11
Remove Duplicate Letters11
Unique Binary Search Trees11
Possible Bipartition11
Minimum Remove to Make Valid Parentheses11
Longest Substring with At Most K Distinct Characters11
Dot Product of Two Sparse Vectors11
Perfect Squares10
Delete and Earn10
Find the Winner of the Circular Game10
Heaters10
Construct Binary Tree from Preorder and Inorder Traversal10
Surrounded Regions10
Pacific Atlantic Water Flow10
Minimum Number of Swaps to Make the String Balanced10
Spiral Matrix II10
Design File System10
Permutations II10
Lowest Common Ancestor of a Binary Search Tree10
Car Fleet10
Maximum Points You Can Obtain from Cards10
Compare Version Numbers10
Find All Possible Recipes from Given Supplies10
Remove All Occurrences of a Substring10
Diagonal Traverse10
Kth Smallest Element in a Sorted Matrix10
Car Pooling10
Encode and Decode Strings10
Remove Duplicates from Sorted List II10
Minimum Number of Steps to Make Two Strings Anagram10
Merge In Between Linked Lists10
Design Authentication Manager10
Candy Crush10
Number of Black Blocks10
Minimum Operations to Reduce an Integer to 09
Sort an Array9
Maximum Swap9
Remove Duplicates from Sorted Array II9
Next Greater Element III9

Showing 200 of 1,744 questions