Skip to content
Must Know DSA Problems for Interview
1 Heaps & Bit Manipulation
- Single Number (Bit Manipulation)
- Kth Smallest Element in a BST
- Kth Largest Element in an Array
- K Closest Points to Origin
- Top K Frequent Elements
- Delete Node in a BST
- Balance a Binary Search Tree
- How Many Numbers Are Smaller Than the Current Number (Greedy)
2 DP & Backtracking
- Coin Change Climbing Stairs
- Maximum Subarray Counting Bits
- Range Sum Query – Immutable
- Subsets
- Combinations
- Permutations
- Cheapest Flights Within K
- Stops
- Minimum Absolute Difference
3 Linked Lists
- Middle of Linked List
- Linked List Cycle
- Reverse Linked List
- Remove Linked List Elements
- Reverse Linked List
- Palindrome Linked List
- Merge Two Sorted Lists
- Linked List Sorting
4 Trees & Graphs
- Average of Levels
- Minimum Depth
- Min/Max Value
- Level Order Traversal
- Same Tree
- Path Sum
- Diameter of a Binary Tree
- Invert Binary Tree
- Lowest Common Ancestor
- Binary Search Tree
- Insert in Binary Search Tree
- Convert Sorted Array to Binary Search Tree
- Two Sum IV – Input is a BST
- Lowest Common Ancestor
5 Stacks & Queues
- Min Stack
- Valid Parentheses
- Evaluate Reverse Polish Notation
- Stack Sorting
- Implement Stack using Queues
- Time Needed to Buy Tickets
- Reverse the First K Elements of a Queue
- Task Scheduler
- Letter Case Permutation
- Minimum Size Subarray Sum
6 Arrays & Strings
- Contains Duplicate
- Missing Number
- Numbers Disappeared Array
- Two Sum
- How Many Numbers Are Smaller Than the Current Number
- Minimum Time Visiting All Points
- Spiral Matrix
- Number of Islands
- Best Time to Buy and Sell Stock
- Squares of a Sorted Array
- 3Sum
- Longest Mountain in Array