The extended list with three problems under each difficulty level (Easy, Medium, Hard) for each DSA pattern:
Disclaimer: All the problems links will redirect you to leetcode, few problems are only accessible for premium users on leetcode.
1. Sliding Window
No. | Problem | Level | Resource |
---|---|---|---|
1. | Maximum Sum of Two Non-Overlapping Subarrays | Easy | |
2. | Longest Substring Without Repeating Characters | Easy | |
3. | Grumpy Bookstore Owner | Easy | |
4. | Minimum Window Substring | Medium | |
5. | Longest Substring with At Least K Repeating Characters | Medium | |
6. | Permutation in String | Medium | |
7. | Substring with Concatenation of All Words | Hard | |
8. | Sliding Window Maximum | Hard | |
9. | Longest Substring with At Most Two Distinct Characters | Hard |
2. Two Pointers
No. | Problem | Level | Resource |
---|---|---|---|
1. | Two Sum II – Input Array Is Sorted | Easy | |
2. | Remove Duplicates from Sorted Array | Easy | |
3. | Valid Palindrome II | Easy | |
4. | 3Sum | Medium | |
5. | Container With Most Water | Medium | |
6. | Subarray Product Less Than K | Medium | |
7. | Trapping Rain Water | Hard | |
8. | 4Sum | Hard | |
9. | Shortest Word Distance II | Hard |
3. Fast & Slow Pointers
No. | Problem | Level | Resource |
---|---|---|---|
1. | Linked List Cycle | Easy | |
2. | Middle of the Linked List | Easy | |
3. | Happy Number | Easy | |
4. | Find the Duplicate Number | Medium | |
5. | Remove Linked List Elements | Medium | |
6. | Linked List Cycle II | Medium | |
7. | Palindrome Linked List | Hard | |
8. | Reorder List | Hard | |
9. | Split Linked List in Parts | Hard |
4. Merge Intervals
No. | Problem | Level | Resource |
---|---|---|---|
1. | Merge Two Sorted Lists | Easy | |
2. | Interval List Intersections | Easy | |
3. | Minimum Number of Arrows to Burst Balloons | Easy | |
4. | Merge Intervals | Medium | |
5. | Insert Interval | Medium | |
6. | Meeting Rooms II | Medium | |
7. | Employee Free Time | Hard | |
8. | The Skyline Problem | Hard | |
9. | Minimum Cost to Hire K Workers | Hard |
5. Cyclic Sort
No. | Problem | Level | Resource |
---|---|---|---|
1. | Find All Numbers Disappeared in an Array | Easy | |
2. | Find the Duplicate Number | Easy | |
3. | Find All Duplicates in an Array | Easy | |
4. | Set Mismatch | Medium | |
5. | First Missing Positive | Medium | |
6. | Missing Number | Medium | |
7. | First Missing Positive | Hard | |
8. | Find the Duplicate Number | Hard | |
9. | Find All Numbers Disappeared in an Array | Hard |
6. In-place Reversal of a Linked List
No. | Problem | Level | Resource |
---|---|---|---|
1. | Reverse Linked List | Easy | |
2. | Reverse Linked List II | Easy | |
3. | Palindrome Linked List | Easy | |
4. | Reverse Nodes in k-Group | Medium | |
5. | Swap Nodes in Pairs | Medium | |
6. | Rotate List | Medium | |
7. | Reverse Nodes in k-Group | Hard | |
8. | Reverse Linked List II | Hard | |
9. | Rotate List | Hard |
7. Tree BFS
No. | Problem | Level | Resource |
---|---|---|---|
1. | Binary Tree Level Order Traversal | Easy | |
2. | Binary Tree Level Order Traversal II | Easy | |
3. | Minimum Depth of Binary Tree | Easy | |
4. | Binary Tree Zigzag Level Order Traversal | Medium | |
5. | Binary Tree Right Side View | Medium | |
6. | Cousins in Binary Tree | Medium | |
7. | Word Ladder | Hard | |
8. | Cut Off Trees for Golf Event | Hard | |
9. | Binary Tree Maximum Path Sum | Hard |
8. Tree DFS
No. | Problem | Level | Resource |
---|---|---|---|
1. | Path Sum | Easy | |
2. | Invert Binary Tree | Easy | |
3. | Diameter of Binary Tree | Easy | |
4. | Path Sum II | Medium | |
5. | Binary Tree Longest Consecutive Sequence | Medium | |
6. | Binary Tree Maximum Path Sum | Medium | |
7. | Binary Tree Cameras | Hard | |
8. | Binary Tree Maximum Path Sum | Hard | |
9. | Path Sum III | Hard |
9. Two Heaps
No. | Problem | Level | Resource |
---|---|---|---|
1. | Last Stone Weight | Easy | |
2. | Kth Largest Element in a Stream | Easy | |
3. | Top K Frequent Elements | Easy | |
4. | Find Median from Data Stream | Medium | |
5. | Sliding Window Median | Medium | |
6. | IPO – LeetCode | Medium | |
7. | Minimum Cost to Connect Sticks | Hard | |
8. | The Skyline Problem | Hard | |
9. | Find Median from Data Stream | Hard |
10. Subsets
No. | Problem | Level | Resource |
---|---|---|---|
1. | Subsets | Easy | |
2. | Combination Sum | Easy | |
3. | Permutations | Easy | |
4. | Subsets II | Medium | |
5. | Combination Sum II | Medium | |
6. | Permutations II | Medium | |
7. | Word Squares | Hard | |
8. | Palindrome Partitioning II | Hard | |
9. | Super Palindromes | Hard |
11. Modified Binary Search
No. | Problem | Level | Resource |
---|---|---|---|
1. | Search Insert Position | Easy | |
2. | Guess Number Higher or Lower | Easy | |
3. | Find Smallest Letter Greater Than Target | Easy | |
4. | Search in Rotated Sorted Array | Medium | |
5. | Find Peak Element | Medium | |
6. | Search a 2D Matrix | Medium | |
7. | Median of Two Sorted Arrays | Hard | |
8. | Split Array Largest Sum | Hard | |
9. | Find Minimum in Rotated Sorted Array II | Hard |
12. Top K Elements
No. | Problem | Level | Resource |
---|---|---|---|
1. | Kth Largest Element in a Stream | Easy | |
2. | Top K Frequent Elements | Easy | |
3. | Sort Characters By Frequency | Easy | |
4. | Kth Largest Element in an Array | Medium | |
5. | Task Scheduler | Medium | |
6. | Top K Frequent Words | Medium | |
7. | Smallest Range Covering Elements from K Lists | Hard | |
8. | Sliding Window Median | Hard | |
9. | Find Median from Data Stream | Hard |
13. K-way Merge
No. | Problem | Level | Resource |
---|---|---|---|
1. | Merge Two Sorted Lists | Easy | |
2. | Merge Sorted Array | Easy | |
3. | Intersection of Two Arrays II | Easy | |
4. | Merge k Sorted Lists | Medium | |
5. | Kth Smallest Element in a Sorted Matrix | Medium | |
6. | Find K Pairs with Smallest Sums | Medium | |
7. | Smallest Range Covering Elements from K Lists | Hard | |
8. | Median of Two Sorted Arrays | Hard | |
9. | Split Array Largest Sum | Hard |
14. Knapsack (Dynamic Programming)
No. | Problem | Level | Resource |
---|---|---|---|
1. | Climbing Stairs | Easy | |
2. | House Robber | Easy | |
3. | Partition Equal Subset Sum | Easy | |
4. | Partition Equal Subset Sum | Medium | |
5. | Coin Change | Medium | |
6. | Target Sum | Medium | |
7. | Target Sum | Hard | |
8. | Coin Change 2 | Hard | |
9. | Wildcard Matching | Hard |
15. Palindrome
No. | Problem | Level | Resource |
---|---|---|---|
1. | Valid Palindrome | Easy | |
2. | Valid Palindrome II | Easy | |
3. | Palindrome Linked List | Easy | |
4. | Longest Palindromic Substring | Medium | |
5. | Palindromic Substrings | Medium | |
6. | Palindrome Partitioning | Medium | |
7. | Palindrome Pairs | Hard | |
8. | Longest Palindromic Subsequence | Hard | |
9. | Palindrome Partitioning II | Hard |
16. Topological Sort
No. | Problem | Level | Resource |
---|---|---|---|
1. | Course Schedule | Easy | |
2. | Course Schedule II | Easy | |
3. | Find Eventual Safe States | Easy | |
4. | Course Schedule II | Medium | |
5. | Alien Dictionary | Medium | |
6. | Minimum Height Trees | Medium | |
7. | Alien Dictionary | Hard | |
8. | Sequence Reconstruction | Hard | |
9. | Parallel Courses | Hard |
17. Trie
No. | Problem | Level | Resource |
---|---|---|---|
1. | Implement Trie (Prefix Tree) | Easy | |
2. | Add and Search Word – Data structure design | Easy | |
3. | Design Add and Search Words Data Structure | Easy | |
4. | Word Search | Medium | |
5. | Word Search II | Medium | |
6. | Replace Words | Medium | |
7. | Design Search Autocomplete System | Hard | |
8. | Concatenated Words | Hard | |
9. | Longest Word in Dictionary through Deleting | Hard |
18. Greedy Technique
No. | Problem | Level | Resource |
---|---|---|---|
1. | Assign Cookies | Easy | |
2. | Two City Scheduling | Easy | |
3. | Is Subsequence | Easy | |
4. | Jump Game | Medium | |
5. | Partition Labels | Medium | |
6. | Queue Reconstruction by Height | Medium | |
7. | Candy | Hard | |
8. | Minimum Number of Refueling Stops | Hard | |
9. | Minimum Cost to Hire K Workers | Hard |
19. Backtracking
No. | Problem | Level | Resource |
---|---|---|---|
1. | Letter Combinations of a Phone Number | Easy | |
2. | Generate Parentheses | Easy | Solution |
3. | Subsets | Easy | |
4. | Subsets II | Medium | |
5. | Combination Sum | Medium | |
6. | Permutations | Medium | |
7. | N-Queens | Hard | |
8. | Sudoku Solver | Hard | |
9. | Word Search II | Hard |
20. Dynamic Programming
No. | Problem | Level | Resource |
---|---|---|---|
1. | House Robber | Easy | |
2. | Climbing Stairs | Easy | |
3. | Best Time to Buy and Sell Stock | Easy | |
4. | Longest Increasing Subsequence | Medium | |
5. | Longest Common Subsequence | Medium | |
6. | Coin Change | Medium | |
7. | Edit Distance | Hard | |
8. | Burst Balloons | Hard | |
9. | Regular Expression Matching | Hard |
21. Monotonic Stack
No. | Problem | Level | Resource |
---|---|---|---|
1. | Next Greater Element I | Easy | |
2. | Next Greater Element II | Easy | |
3. | Remove All Adjacent Duplicates in String II | Easy | |
4. | Daily Temperatures | Medium | |
5. | Asteroid Collision | Medium | |
6. | Sum of Subarray Minimums | Medium | |
7. | Largest Rectangle in Histogram | Hard | |
8. | Trapping Rain Water | Hard | |
9. | Maximal Rectangle | Hard |
22. Bitwise XOR
No. | Problem | Level | Resource |
---|---|---|---|
1. | Single Number | Easy | |
2. | Missing Number | Easy | |
3. | Number Complement | Easy | |
4. | Find the Duplicate Number | Medium | |
5. | Single Number II | Medium | |
6. | Maximum XOR of Two Numbers in an Array | Medium | |
7. | Find the Smallest Divisor Given a Threshold | Hard | |
8. | Maximum XOR of Two Numbers in an Array | Hard | |
9. | Concatenated Words | Hard |
23. Island (Matrix Traversal) Pattern
No. | Problem | Level | Resource |
---|---|---|---|
1. | Flood Fill | Easy | |
2. | Max Area of Island | Easy | |
3. | Number of Enclaves | Easy | |
4. | Number of Islands | Medium | |
5. | Surrounded Regions | Medium | |
6. | Pacific Atlantic Water Flow | Medium | |
7. | Shortest Bridge | Hard | |
8. | Cut Off Trees for Golf Event | Hard | |
9. | Making A Large Island | Hard |
This expanded list provides a well-rounded set of problems across different difficulty levels, allowing you to practice each DSA pattern progressively.