LeetCode Top Interview 150
The LeetCode Top Interview 150 is a curated list of 150 LeetCode problems, designed to help candidates prepare for technical interviews, particularly at top tech companies, by focusing on essential data structures and algorithms.
150 Original & Classic Questions. Covers comprehensive interview topics. Best for 3+ months of preparation time.
How to Use This Resource
Solve the Problems: Attempt each problem on your own before looking at the solution.
Understand the Concepts: Make sure you understand the underlying data structures and algorithms used in each problem.
Make Notes: Keep a notebook or digital document where you jot down key insights, patterns, and techniques.
Watch Solutions: If you're stuck, watch video explanations or read detailed solutions to understand different approaches.
Have Fun: Enjoy the process of learning and problem-solving. The more you enjoy it, the more you'll learn!
Array / String
- Merge Sorted Array : Easy
- Remove Element : Easy
- Remove Duplicates from Sorted Array : Easy
- Remove Duplicates from Sorted Array II : Medium
- Majority Element : Easy
- Rotate Array : Medium
- Best Time to Buy and Sell Stock : Easy
- Best Time to Buy and Sell Stock II : Medium
- Jump Game : Medium
- Jump Game II : Medium
- H-Index : Medium
- Insert Delete GetRandom O(1) : Medium
- Product of Array Except Self : Medium
- Gas Station : Medium
- Candy : Hard
- Trapping Rain Water : Hard
- Roman to Integer : Easy
- Integer to Roman : Medium
- Length of Last Word : Easy
- Longest Common Prefix : Easy
- Reverse Words in a String : Medium
- Zigzag Conversion : Medium
- Find the Index of the First Occurrence in a String : Easy
- Text Justification : Hard
Two Pointers
- Valid Palindrome : Easy
- Is Subsequence : Easy
- Two Sum II - Input Array Is Sorted : Medium
- Container With Most Water : Medium
- 3Sum : Medium
Sliding Window
- Minimum Size Subarray Sum : Medium
- Longest Substring Without Repeating Characters : Medium
- Substring with Concatenation of All Words : Hard
- Minimum Window Substring : Hard
Matrix
- Valid Sudoku : Medium
- Spiral Matrix : Medium
- Rotate Image : Medium
- Set Matrix Zeroes : Medium
- Game of Life : Medium
Hashmap
- Ransom Note : Easy
- Isomorphic Strings : Easy
- Word Pattern : Easy
- Valid Anagram : Easy
- Group Anagrams : Medium
- Two Sum : Easy
- Happy Number : Easy
- Contains Duplicate II : Easy
- Longest Consecutive Sequence : Medium
Intervals
- Summary Ranges : Easy
- Merge Intervals : Medium
- Insert Interval : Medium
- Minimum Number of Arrows to Burst Balloons : Medium
Stack
- Valid Parentheses : Easy
- Simplify Path : Medium
- Min Stack : Medium
- Evaluate Reverse Polish Notation : Medium
- Basic Calculator : Hard
Linked List
- Linked List Cycle : Easy
- Add Two Numbers : Medium
- Merge Two Sorted Lists : Easy
- Copy List with Random Pointer : Medium
- Reverse Linked List II : Medium
- Reverse Nodes in k-Group : Hard
- Remove Nth Node From End of List : Medium
- Remove Duplicates from Sorted List II : Medium
- Rotate List : Medium
- Partition List : Medium
- LRU Cache : Medium
Binary Tree General
- Maximum Depth of Binary Tree : Easy
- Same Tree : Easy
- Invert Binary Tree : Easy
- Symmetric Tree : Easy
- Construct Binary Tree from Preorder and Inorder Traversal : Medium
- Construct Binary Tree from Inorder and Postorder Traversal : Medium
- Populating Next Right Pointers in Each Node II : Medium
- Flatten Binary Tree to Linked List : Medium
- Path Sum : Easy
- Sum Root to Leaf Numbers : Medium
- Binary Tree Maximum Path Sum : Hard
- Binary Search Tree Iterator : Medium
- Count Complete Tree Nodes : Easy
- Lowest Common Ancestor of a Binary Tree : Medium
Binary Tree BFS
- Binary Tree Right Side View : Medium
- Average of Levels in Binary Tree : Easy
- Binary Tree Level Order Traversal : Medium
- Binary Tree Zigzag Level Order Traversal : Medium
Binary Search Tree
- Minimum Absolute Difference in BST : Easy
- Kth Smallest Element in a BST : Medium
- Validate Binary Search Tree : Medium
Graph General
- Number of Islands : Medium
- Surrounded Regions : Medium
- Clone Graph : Medium
- Evaluate Division : Medium
- Course Schedule : Medium
- Course Schedule II : Medium
Graph BFS
- Snakes and Ladders : Medium
- Minimum Genetic Mutation : Medium
- Word Ladder : Hard
Trie
- Implement Trie (Prefix Tree) : Medium
- Design Add and Search Words Data Structure : Medium
- Word Search II : Hard
Backtracking
- Letter Combinations of a Phone Number : Medium
- Combinations : Medium
- Permutations : Medium
- Combination Sum : Medium
- N-Queens II : Hard
- Generate Parentheses : Medium
- Word Search : Medium
Divide & Conquer
- Convert Sorted Array to Binary Search Tree : Easy
- Sort List : Medium
- Construct Quad Tree : Medium
- Merge k Sorted Lists : Hard
Kadane's Algorithm
- Maximum Subarray : Medium
- Maximum Sum Circular Subarray : Medium
Binary Search
- Search Insert Position : Easy
- Search a 2D Matrix : Medium
- Find Peak Element : Medium
- Search in Rotated Sorted Array : Medium
- Find First and Last Position of Element in Sorted Array : Medium
- Find Minimum in Rotated Sorted Array : Medium
- Median of Two Sorted Arrays : Hard
Heap
- Kth Largest Element in an Array : Medium
- IPO : Hard
- Find K Pairs with Smallest Sums : Medium
- Find Median from Data Stream : Hard
Bit Manipulation
- Add Binary : Easy
- Reverse Bits : Easy
- Number of 1 Bits : Easy
- Single Number : Easy
- Single Number II : Medium
- Bitwise AND of Numbers Range : Medium
Math
- Palindrome Number : Easy
- Plus One : Easy
- Factorial Trailing Zeroes : Medium
- Sqrt(x) : Easy
- Pow(x, n) : Medium
- Max Points on a Line : Hard
1D DP
- Climbing Stairs : Easy
- House Robber : Medium
- Word Break : Medium
- Coin Change : Medium
- Longest Increasing Subsequence : Medium
Multidimensional DP
- Triangle : Medium
- Minimum Path Sum : Medium
- Unique Paths II : Medium
- Longest Palindromic Substring : Medium
- Interleaving String : Medium
- Edit Distance : Medium
- Best Time to Buy and Sell Stock III : Hard
- Best Time to Buy and Sell Stock IV : Hard
- Maximal Square : Medium
Learning Resources
DSA Roadmap & Interview Questions
LeetCode Resources for Beginners to Advanced | DSA, System Design & Top Coding Interview Questions
Join our WhatsApp Channel for more resources!