Medium LeetCode Questions

Medium

1,757 unique questions sorted by company popularity

Top Companies

Questions

TitleCompanies
LRU Cache128
Longest Substring Without Repeating Characters112
Merge Intervals109
Group Anagrams91
Number of Islands87
Longest Palindromic Substring76
Maximum Subarray66
3Sum61
Container With Most Water58
Search in Rotated Sorted Array55
Spiral Matrix53
Rotting Oranges53
Top K Frequent Elements51
Subarray Sum Equals K46
Kth Largest Element in an Array45
Product of Array Except Self44
Meeting Rooms II43
String Compression43
Coin Change42
Course Schedule42
Insert Delete GetRandom O(1)42
Koko Eating Bananas41
Decode String41
Letter Combinations of a Phone Number40
Generate Parentheses40
Word Search40
Longest Consecutive Sequence39
Add Two Numbers38
House Robber38
Rotate Image37
Min Stack36
Asteroid Collision35
Word Break35
Find Peak Element34
Jump Game34
Sort Colors34
Basic Calculator II34
Daily Temperatures33
Best Time to Buy and Sell Stock II33
Course Schedule II33
Integer to Roman32
Time Based Key-Value Store32
Find First and Last Position of Element in Sorted Array31
Edit Distance31
Next Permutation31
Reverse Words in a String30
Rotate Array30
Longest Increasing Subsequence30
Valid Sudoku30
Task Scheduler30
Combination Sum30
Maximal Square30
Jump Game II28
Gas Station27
Random Pick with Weight26
Reverse Integer26
Permutations26
Top K Frequent Words26
Simplify Path25
Largest Number24
Implement Trie (Prefix Tree)24
Reorganize String24
Set Matrix Zeroes24
Copy List with Random Pointer24
Evaluate Division24
Find the Duplicate Number23
Pow(x, n)23
Decode Ways23
Lowest Common Ancestor of a Binary Tree23
Palindromic Substrings23
Unique Paths22
Search Suggestions System22
Design Circular Queue22
Longest Common Subsequence21
Remove K Digits21
Maximum Product Subarray21
Subarray Product Less Than K21
Design Hit Counter21
House Robber II21
Subsets20
Validate Binary Search Tree20
Longest Repeating Character Replacement20
Max Area of Island20
Max Consecutive Ones III20
Capacity To Ship Packages Within D Days20
Simple Bank System20
Accounts Merge20
Second Highest Salary19
Count Primes19
Search a 2D Matrix19
String to Integer (atoi)19
Remove Nth Node From End of List19
4Sum19
Single Element in a Sorted Array19
Zigzag Conversion19
Find All Anagrams in a String18
Reverse Linked List II18
Restore IP Addresses18
Find K Closest Elements18
Longest String Chain18
Remove All Adjacent Duplicates in String II18
Flatten Nested List Iterator18
Cheapest Flights Within K Stops18
Clone Graph18
Evaluate Reverse Polish Notation18
Find Minimum in Rotated Sorted Array18
Next Greater Element II18
Snapshot Array18
Sort Characters By Frequency17
Binary Tree Zigzag Level Order Traversal17
Combination Sum II17
Reorder List17
Two Sum II - Input Array Is Sorted17
K Closest Points to Origin17
Shortest Path in Binary Matrix17
Valid Parenthesis String17
Multiply Strings17
Minimum Path Sum17
Search a 2D Matrix II17
Partition Equal Subset Sum17
Open the Lock17
Find the Length of the Longest Common Prefix17
01 Matrix16
Binary Tree Right Side View16
Game of Life16
Swap Nodes in Pairs16
Insert Interval16
Minimum Size Subarray Sum16
Design Add and Search Words Data Structure16
Non-overlapping Intervals16
Shortest Bridge16
Furthest Building You Can Reach16
Design Memory Allocator16
Permutation in String15
Design Twitter15
Design Tic-Tac-Toe15
Maximum Number of Events That Can Be Attended15
Longest Palindromic Subsequence14
Contiguous Array14
Binary Tree Level Order Traversal14
Find All Duplicates in an Array14
Next Greater Element III14
Find the Celebrity14
Remove Duplicate Letters14
House Robber III14
Number of Distinct Islands14
Boats to Save People14
Car Pooling14
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit14
The Maze14
Minimum Remove to Make Valid Parentheses13
Validate IP Address13
Boundary of Binary Tree13
Triangle13
Find the Smallest Divisor Given a Threshold13
Count and Say13
Interleaving String13
Car Fleet13
Interval List Intersections13
Perfect Squares12
Find the Winner of the Circular Game12
Sort an Array12
Remove Duplicates from Sorted Array II12
Surrounded Regions12
Pacific Atlantic Water Flow12
Subarray Sums Divisible by K12
Amount of Time for Binary Tree to Be Infected12
Minimum Number of Swaps to Make the String Balanced12
Heaters12
Unique Paths II12
Design File System12
Robot Bounded In Circle12
Rotate List12
Walls and Gates12
Odd Even Linked List12
Longest Substring with At Most K Distinct Characters12
Diagonal Traverse12
All Nodes Distance K in Binary Tree12
Minimum Cost For Tickets12
Pairs of Songs With Total Durations Divisible by 6012
Minimum Knight Moves12
Design Browser History12
Dot Product of Two Sparse Vectors12
Remove All Occurrences of a Substring12
Delete and Earn11
Sum of Subarray Minimums11
Construct Binary Tree from Preorder and Inorder Traversal11
Majority Element II11
H-Index11
3Sum Closest11
Unique Binary Search Trees11
Path Sum II11
Linked List Cycle II11
Kth Smallest Element in a BST11
Encode and Decode Strings11
Path Sum III11
Delete Node in a BST11
Target Sum11
Coin Change II11
Exclusive Time of Functions11

Showing 200 of 1,757 questions