๐Ÿง  DSA Animator

Total: 170+  |  Easy: 60+  |  Medium: 85+  |  Hard: 25+
๐Ÿ— System Design ๐Ÿ’ผ Jobs ๐ŸŽค Mock Interview โ˜• Java ๐ŸŽฏ Quiz

๐Ÿ“‹ Recommended Learning Sequence

1. Arraysโ†’ 2. Stringsโ†’ 3. Matrixโ†’ 4. Stackโ†’ 5. Queueโ†’ 6. Binary Searchโ†’ 7. Linked Listโ†’ 8. Greedyโ†’ 9. Intervalsโ†’ 10. Backtrackingโ†’ 11. Treeโ†’ 12. Heapโ†’ 13. Graphโ†’ 14. Dynamic Programmingโ†’ 15. Bit Manipulationโ†’ 16. Trieโ†’ 17. Design
Priority:
P1 โ€” Must Do  High interview frequency, core patterns
P2 โ€” Important  Commonly asked, good to know
P3 โ€” Good to Know  Warmup / low frequency
๐Ÿ”
Status
๐Ÿ“ฆ
Arrays
Basics ยท Two Pointers ยท Subarray ยท Hashing ยท Rotation ยท Sorting ยท Sliding Window
18 problems
Basics
#1929
Concatenation of Array
basics
Easy
#1480
Running Sum of 1D Array
prefix sum
Easy
#1672
Richest Customer Wealth
2D array
Easy
#1470
Shuffle the Array
basics
Easy
#832
Flipping an Image
basics
Easy
#2239
Find Closest Number to Zero
basics
Easy
Two Pointers
#88
Merge Sorted Array
two pointers
Easy
#26
Remove Duplicates
two pointers
Easy
#977
Squares of Sorted Array
two pointers
Easy
#15
Three Sum
sort + two pointers
Medium
#42
Trapping Rain Water
two pointers
Hard
#167
Two Sum II
two pointers
Medium
#11
Container With Most Water
two pointers
Medium
Subarray ยท Sliding Window
#53
Maximum Subarray
Kadane's algorithm
Medium
#121
Best Time to Buy and Sell Stock
greedy / Kadane
Easy
#643
Max Average Subarray I
fixed sliding window
Easy
#1004
Max Consecutive Ones III
variable sliding window
Medium
#209
Minimum Size Subarray Sum
variable sliding window
Medium
Hashing
#1
Two Sum
HashMap
Easy
#217
Contains Duplicate
HashSet
Easy
#41
First Missing Positive
index marking
Hard
#238
Product of Array Except Self
prefix product
Medium
#383
Ransom Note
frequency map
Easy
#560
Subarray Sum Equals K
prefix sum + HashMap
Medium
#169
Majority Element
Boyer-Moore voting
Easy
#128
Longest Consecutive Sequence
HashSet
Medium
Rotation ยท Sorting
#189
Rotate Array
triple reverse
Medium
#75
Sort Colors
Dutch National Flag
Medium
๐Ÿ”ค
Strings
General ยท Sliding Window ยท Anagram ยท Palindrome
17 problems
General
#13
Roman to Integer
string parsing
Easy
#14
Longest Common Prefix
string
Easy
#271
Encode and Decode Strings
delimiter encoding
Medium
#205
Isomorphic Strings
bijection map
Easy
#344
Reverse String
two pointers
Easy
Sliding Window on Strings
#3
Longest Substring Without Repeating
sliding window + set
Medium
#424
Longest Repeating Char Replacement
sliding window
Medium
#76
Minimum Window Substring
sliding window + map
Hard
#567
Permutation in String
fixed window + matches
Medium
#438
Find All Anagrams in String
fixed window + matches
Medium
Anagram
#242
Valid Anagram
frequency count
Easy
#49
Group Anagrams
sorted key / count key
Medium
#1189
Maximum Number of Balloons
frequency map
Easy
Palindrome
#125
Valid Palindrome
two pointers
Easy
#680
Valid Palindrome II
greedy skip
Medium
#5
Longest Palindromic Substring
expand around center
Medium
#647
Palindromic Substrings
expand around center
Medium
๐Ÿ”ฒ
Matrix
2D Grid traversal, simulation, DFS/BFS on grid
9 problems
#54
Spiral Matrix
simulation
Medium
#59
Spiral Matrix II
simulation
Medium
#200
Number of Islands
DFS/BFS on grid
Medium
#73
Set Matrix Zeroes
in-place marking
Medium
#79
Word Search
DFS + backtrack
Medium
#240
Search a 2D Matrix II
staircase search
Medium
#48
Rotate Image
transpose + reverse
Medium
#74
Search a 2D Matrix
binary search
Medium
#36
Valid Sudoku
HashSet per row/col/box
Medium
๐Ÿ“š
Stack
Monotonic stack, expression evaluation, min stack
8 problems
#20
Valid Parentheses
stack
Easy
#150
Evaluate Reverse Polish Notation
stack
Medium
#739
Daily Temperatures
monotonic stack
Medium
#155
Min Stack
design
Medium
#496
Next Greater Element I
monotonic stack
Easy
#84
Largest Rectangle in Histogram
monotonic stack
Hard
#85
Maximal Rectangle
stack on histogram
Hard
#224
Basic Calculator
stack + sign
Hard
๐Ÿ”
Queue
1 problem
GFG
Reversing First K Elements of Queue
queue + stack
Medium
๐Ÿ”
Binary Search
Classic search ยท Search on answer ยท Rotated array
13 problems
#35
Search Insert Position
binary search
Easy
#268
Missing Number
math / XOR
Easy
#34
Find First and Last Position
binary search x2
Medium
#162
Find Peak Element
binary search
Medium
#153
Find Minimum in Rotated Sorted Array
binary search
Medium
#33
Search in Rotated Sorted Array
binary search
Medium
#81
Search in Rotated Sorted Array II
binary search + dups
Medium
#875
Koko Eating Bananas
search on answer
Medium
#1011
Capacity to Ship Packages
search on answer
Medium
#410
Split Array Largest Sum
search on answer
Hard
GFG
Allocate Minimum Pages
search on answer
Hard
IB
Painter's Partition Problem
search on answer
Hard
#4
Median of Two Sorted Arrays
binary search on partition
Hard
๐Ÿ”—
Linked List
Reversal, cycle detection, merge, Floyd's
13 problems
#83
Remove Duplicates from Sorted List
traversal
Easy
#206
Reverse Linked List
iterative / recursive
Easy
#141
Linked List Cycle
Floyd's cycle
Easy
#876
Middle of Linked List
slow/fast pointer
Easy
#19
Remove Nth Node From End
two pointers
Medium
#138
Copy List with Random Pointer
HashMap
Medium
#2
Add Two Numbers
carry simulation
Medium
#202
Happy Number
Floyd's cycle
Easy
#92
Reverse Linked List II
in-place reversal
Medium
#234
Palindrome Linked List
reverse second half
Easy
#143
Reorder List
middle + reverse + merge
Medium
#23
Merge K Sorted Lists
min-heap
Hard
#25
Reverse Nodes in K-Group
group reversal
Hard
๐Ÿ’ก
Greedy
Locally optimal choices
5 problems
#55
Jump Game
greedy reach
Medium
#45
Jump Game II
greedy BFS
Medium
#135
Distribute Candy
two-pass greedy
Hard
#134
Gas Station
greedy circular
Medium
GFG
Minimum Platforms
sort + two pointers
Medium
๐Ÿ“…
Intervals
Merge, insert, sweep line
5 problems
#56
Merge Intervals
sort + merge
Medium
#57
Insert Interval
merge insert
Medium
#253
Meeting Rooms II
min-heap / sweep
Medium
#435
Non-Overlapping Intervals
greedy sort
Medium
#452
Minimum Arrows to Burst Balloons
greedy sort
Medium
๐ŸŒฟ
Backtracking
Subsets, permutations, combinations, constraint solving
9 problems
#78
Subsets
backtracking
Medium
#90
Subsets II
backtrack + dedup
Medium
#46
Permutations
backtracking
Medium
#77
Combinations
backtracking
Medium
#39
Combination Sum
backtrack reuse
Medium
#17
Letter Combinations Phone Number
backtracking
Medium
#22
Generate Parentheses
backtracking
Medium
#51
N-Queens
backtrack + constraints
Hard
#37
Sudoku Solver
backtrack + constraints
Hard
๐ŸŒณ
Tree
BFS, DFS, BST, construction, path problems
20 problems
#102
Binary Tree Level Order Traversal
BFS
Medium
#637
Average of Levels
BFS
Easy
#103
Binary Tree Zigzag Level Order
BFS + deque
Medium
#199
Binary Tree Right Side View
BFS last node
Medium
#101
Symmetric Tree
DFS mirror
Easy
#543
Diameter of Binary Tree
DFS height
Easy
#226
Invert Binary Tree
DFS
Easy
#104
Maximum Depth of Binary Tree
DFS
Easy
#110
Balanced Binary Tree
DFS height
Easy
#108
Convert Sorted Array to BST
divide & conquer
Easy
#114
Flatten Binary Tree to Linked List
DFS in-place
Medium
#98
Validate Binary Search Tree
inorder / bounds
Medium
#236
Lowest Common Ancestor
DFS
Medium
#230
Kth Smallest in BST
inorder
Medium
#105
Construct Tree from Preorder+Inorder
divide & conquer
Medium
#297
Serialize / Deserialize Binary Tree
BFS / DFS encode
Hard
#112
Path Sum
DFS
Easy
#113
Path Sum II
DFS + backtrack
Medium
#129
Sum Root to Leaf Numbers
DFS
Medium
#124
Binary Tree Maximum Path Sum
DFS gain
Hard
โ›
Heap / Priority Queue
Top-K, two heaps, scheduling
6 problems
#1046
Last Stone Weight
max-heap
Easy
#215
Kth Largest Element in Array
min-heap of k
Medium
#347
Top K Frequent Elements
heap + freq map
Medium
#973
K Closest Points to Origin
max-heap of k
Medium
#621
Task Scheduler
greedy formula
Medium
#295
Find Median from Data Stream
two heaps
Hard
๐Ÿ•ธ
Graph
BFS/DFS, topo sort, shortest path, MST, Union-Find
11 problems
#1971
Find if Path Exists in Graph
Union-Find / BFS
Easy
#994
Rotting Oranges
multi-source BFS
Medium
#133
Clone Graph
DFS + HashMap
Medium
#207
Course Schedule
cycle detection DFS
Medium
#210
Course Schedule II
Kahn's topo sort
Medium
GFG
Is Graph a Tree?
DFS cycle + connected
Medium
#417
Pacific Atlantic Water Flow
reverse BFS from coasts
Medium
#743
Network Delay Time
Dijkstra
Medium
#787
Cheapest Flights Within K Stops
Bellman-Ford
Medium
#399
Evaluate Division
weighted BFS
Medium
#1584
Min Cost to Connect All Points
Prim's MST
Medium
๐ŸŽฏ
Dynamic Programming
1D, 2D DP, LCS, knapsack, LIS
15 problems
#509
Fibonacci Number
dp base
Easy
#70
Climbing Stairs
1D DP
Easy
#746
Min Cost Climbing Stairs
1D DP
Easy
#62
Unique Paths
2D DP
Easy
#63
Unique Paths II
2D DP + obstacles
Medium
#120
Triangle
bottom-up DP
Medium
#198
House Robber
1D DP
Medium
#213
House Robber II
circular DP
Medium
#152
Maximum Product Subarray
min/max DP
Medium
#300
Longest Increasing Subsequence
patience sort O(n log n)
Medium
#91
Decode Ways
1D DP
Medium
#322
Coin Change
unbounded knapsack
Medium
#1143
Longest Common Subsequence
2D DP
Medium
#72
Edit Distance
2D DP
Hard
GFG
Longest Common Substring
2D DP
Medium
โšก
Bit Manipulation
XOR tricks, bit counting, Floyd's
8 problems
#389
Find the Difference
XOR
Easy
#191
Number of 1 Bits
Kernighan's n&(n-1)
Easy
#231
Power of Two
n&(n-1)==0
Easy
#338
Counting Bits
DP + right shift
Easy
#371
Sum of Two Integers
XOR + carry
Medium
#260
Single Number III
XOR partition
Medium
#137
Single Number II
bit mod 3
Medium
#287
Find the Duplicate Number
Floyd's cycle
Medium
๐ŸŒ
Trie
Prefix tree, word search
2 problems
#208
Implement Trie
trie design
Medium
#212
Word Search II
trie + backtrack
Hard
๐Ÿ—
Design
Data structure design
1 problem
#146
LRU Cache
HashMap + doubly LinkedList
Medium
๐ŸŽฏ Pattern Quiz
โ€”Attempts
โ€”Avg Score
โ€”Best
โ€”Last Attempt