DSA Problem List for 3-Month Interview Prep
Arrays
- Two Sum
- Best Time to Buy and Sell Stock
- Maximum Subarray
- Majority Element
- Move Zeroes
- Merge Intervals
- Insert Interval
- 3Sum
- 4Sum
- Container With Most Water
- Product of Array Except Self
- Subarray Sum Equals K
- Longest Consecutive Sequence
- Rotate Image
- Spiral Matrix
- Set Matrix Zeroes
- Jump Game
- Jump Game II
- Trapping Rain Water
- Valid Sudoku
Strings
- Valid Anagram
- Group Anagrams
- Valid Palindrome
- Longest Palindromic Substring
- Longest Substring Without Repeating Characters
- Minimum Window Substring
- Roman to Integer
- Integer to Roman
- String to Integer (atoi)
- Implement strstr
- Isomorphic Strings
- Word Pattern
HashMaps
- Two Sum
- Subarray Sum Equals K
- Longest Consecutive Sequence
- Top K Frequent Elements
- Group Anagrams
- Longest Substring Without Repeat
Linked Lists
- Reverse Linked List
- Merge Two Sorted Lists
- Reorder List
- Linked List Cycle
- Remove Nth Node From End
- Add Two Numbers
- Intersection of Two Linked Lists
- Copy List With Random Pointer
- Rotate List
- Flatten Linked List
Stacks & Queues
- Valid Parentheses
- Min Stack
- Evaluate Reverse Polish Notation
- Implement Queue Using Stacks
- Daily Temperatures
- Next Greater Element
- Largest Rectangle in Histogram
- Sliding Window Maximum
Binary Search
- Binary Search
- Search Insert Position
- First & Last Occurrence
- Search in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array
- Koko Eating Bananas
- Peak Element
- Median of Two Sorted Arrays
Trees
- Maximum Depth
- Diameter of Tree
- Balanced Binary Tree
- Symmetric Tree
- Path Sum
- Path Sum II
- LCA of BST
- LCA of Binary Tree
- Level Order Traversal
- Zigzag Traversal
- Build Tree from Preorder + Inorder
BST
- Validate BST
- Kth Smallest Element
- Delete Node in BST
- Insert Into BST
Heaps
- Kth Largest Element
- Merge K Sorted Lists
- Top K Frequent Elements
- Find Median From Data Stream
Graphs
- Number of Islands
- Clone Graph
- Course Schedule
- Course Schedule II
- Is Graph Bipartite
- Rotten Oranges
- Word Ladder
- Pacific Atlantic Water Flow
Greedy
- Jump Game
- Gas Station
- Assign Cookies
- Minimum Arrows to Burst Balloons
- Non-overlapping Intervals
Dynamic Programming
- Climbing Stairs
- House Robber
- House Robber II
- Coin Change
- Coin Change 2
- Edit Distance
- LCS
- LIS
- 0/1 Knapsack
- Partition Equal Subset
- Unique Paths
- Minimum Path Sum