Top 150 inteview Problems
This curated list contains 150 problems sorted by topic and difficulty to help you systematically grind and improve your problem-solving skills.
Array / String
Easy
- Merge Sorted Array
- Remove Element
- Remove Duplicates from Sorted Array
- Majority Element
- Best Time to Buy and Sell Stock
- Roman to Integer
- Length of Last Word
- Longest Common Prefix
- Find the Index of the First Occurrence in a String
Medium
- Remove Duplicates from Sorted Array II
- Rotate Array
- Best Time to Buy and Sell Stock II
- Jump Game
- Jump Game II
- H-Index
- Insert Delete GetRandom O(1)
- Product of Array Except Self
- Gas Station
- Integer to Roman
- Reverse Words in a String
- Zigzag Conversion
Hard
- Candy
- Trapping Rain Water
- Text Justification
- Substring with Concatenation of All Words
- Minimum Window Substring
Two Pointers
Easy
Medium
Matrix
Medium
Hashmap
Easy
- Ransom Note
- Isomorphic Strings
- Word Pattern
- Valid Anagram
- Group Anagrams
- Two Sum
- Happy Number
- Contains Duplicate II
Medium
Intervals
Easy
Medium
Stack
Easy
Medium
Hard
Linked List
Easy
Medium
- Add Two Numbers
- Copy List with Random Pointer
- Reverse Linked List II
- Remove Nth Node From End of List
- Remove Duplicates from Sorted List II
- Rotate List
Hard
Binary Tree
Easy
Medium
- Construct Binary Tree from Preorder and Inorder Traversal
- Flatten Binary Tree to Linked List
- Path Sum
- Sum Root to Leaf Numbers
- Lowest Common Ancestor of a Binary Tree
- Binary Tree Level Order Traversal
- Binary Tree Zigzag Level Order Traversal
Hard
Graph
Medium
Hard
Trie
Medium
Backtracking
Medium
- Letter Combinations of a Phone Number
- Combinations
- Permutations
- Combination Sum
- Generate Parentheses