Loop
Problems
The NeetCode 150, grouped by category — solve on LeetCode, track it here.
0
of 150 solved
All categories
▼
Any difficulty
▼
Any status
▼
Blind 75
150 shown
Arrays & Hashing
0/9
solved
Contains Duplicate
easy
hash set membership check
B75
#217
Valid Anagram
easy
char frequency hash map
B75
#242
Two Sum
easy
hash map (value → index) one pass
B75
#1
Group Anagrams
medium
hash map keyed by char-count signature
B75
#49
Top K Frequent Elements
medium
bucket sort by frequency (or heap)
B75
#347
Encode and Decode Strings
medium
length-prefix string encoding
B75
#271
Product of Array Except Self
medium
prefix and suffix products
B75
#238
Valid Sudoku
medium
hash sets per row/column/3x3 box
#36
Longest Consecutive Sequence
medium
hash set + only expand from sequence starts
B75
#128
Two Pointers
0/5
solved
Valid Palindrome
easy
two pointers from both ends
B75
#125
Two Sum II - Input Array Is Sorted
medium
two pointers on sorted array
#167
3Sum
medium
sort + fixed element + two pointers, skip duplicates
B75
#15
Container With Most Water
medium
two pointers, always move the shorter side
B75
#11
Trapping Rain Water
hard
two pointers tracking left/right max
#42
Sliding Window
0/6
solved
Best Time to Buy and Sell Stock
easy
one pass tracking min price so far
B75
#121
Longest Substring Without Repeating Characters
medium
sliding window + hash set
B75
#3
Longest Repeating Character Replacement
medium
sliding window + max char frequency vs k
B75
#424
Permutation in String
medium
fixed-size window + frequency count compare
#567
Minimum Window Substring
hard
expand/shrink window with need vs have counts
B75
#76
Sliding Window Maximum
hard
monotonic decreasing deque
#239
Stack
0/7
solved
Valid Parentheses
easy
stack of open brackets, match on close
B75
#20
Min Stack
medium
auxiliary stack tracking running minimum
#155
Evaluate Reverse Polish Notation
medium
stack-based postfix evaluation
#150
Generate Parentheses
medium
backtracking with open/close counts
#22
Daily Temperatures
medium
monotonic decreasing stack (next greater element)
#739
Car Fleet
medium
sort by position + time-to-target monotonic stack
#853
Largest Rectangle in Histogram
hard
monotonic increasing stack with popped-bar areas
#84
Binary Search
0/7
solved
Binary Search
easy
classic binary search
#704
Search a 2D Matrix
medium
binary search treating matrix as flat array
#74
Koko Eating Bananas
medium
binary search on answer space (min feasible rate)
#875
Find Minimum in Rotated Sorted Array
medium
modified binary search toward unsorted half
B75
#153
Search in Rotated Sorted Array
medium
binary search deciding which half is sorted
B75
#33
Time Based Key-Value Store
medium
hash map + binary search over timestamps
#981
Median of Two Sorted Arrays
hard
binary search on partition of shorter array
#4
Linked List
0/11
solved
Reverse Linked List
easy
iterative pointer reversal (prev/curr)
B75
#206
Merge Two Sorted Lists
easy
dummy node two-list merge
B75
#21
Linked List Cycle
easy
fast/slow pointers (Floyd's cycle detection)
B75
#141
Reorder List
medium
find middle + reverse second half + interleave merge
B75
#143
Remove Nth Node From End of List
medium
two pointers with n-node gap
B75
#19
Copy List with Random Pointer
medium
hash map old node → cloned node
#138
Add Two Numbers
medium
digit-by-digit traversal with carry
#2
Find the Duplicate Number
medium
Floyd's cycle detection on index-as-pointer graph
#287
LRU Cache
medium
hash map + doubly linked list
#146
Merge k Sorted Lists
hard
divide-and-conquer pairwise merge (or min-heap)
B75
#23
Reverse Nodes in k-Group
hard
in-place group reversal with dummy node
#25
Trees
0/15
solved
Invert Binary Tree
easy
recursive DFS swapping children
B75
#226
Maximum Depth of Binary Tree
easy
recursive DFS depth
B75
#104
Diameter of Binary Tree
easy
DFS returning height while tracking max diameter
#543
Balanced Binary Tree
easy
bottom-up DFS height with balance check
#110
Same Tree
easy
parallel recursive DFS comparison
B75
#100
Subtree of Another Tree
easy
DFS + same-tree check at each node
B75
#572
Lowest Common Ancestor of a Binary Search Tree
medium
descend using BST ordering property
B75
#235
Binary Tree Level Order Traversal
medium
BFS with queue, level by level
B75
#102
Binary Tree Right Side View
medium
BFS taking last node of each level
#199
Count Good Nodes in Binary Tree
medium
DFS carrying max value along path
#1448
Validate Binary Search Tree
medium
DFS with min/max bounds
B75
#98
Kth Smallest Element in a BST
medium
inorder traversal (iterative stack)
B75
#230
Construct Binary Tree from Preorder and Inorder Traversal
medium
recursion: preorder gives root, inorder splits subtrees
B75
#105
Binary Tree Maximum Path Sum
hard
postorder DFS returning max gain, track global max
B75
#124
Serialize and Deserialize Binary Tree
hard
preorder DFS with null markers
B75
#297
Heap / Priority Queue
0/7
solved
Kth Largest Element in a Stream
easy
min-heap of size k
#703
Last Stone Weight
easy
max-heap simulation
#1046
K Closest Points to Origin
medium
heap on squared distance
#973
Kth Largest Element in an Array
medium
heap or quickselect
#215
Task Scheduler
medium
max-heap + cooldown queue (greedy counting)
#621
Design Twitter
medium
heap-merge of followees' recent tweets
#355
Find Median from Data Stream
hard
two balanced heaps (max-heap low / min-heap high)
B75
#295
Backtracking
0/9
solved
Subsets
medium
backtracking include/exclude each element
#78
Combination Sum
medium
backtracking with element reuse allowed
B75
#39
Permutations
medium
backtracking with used set / swapping
#46
Subsets II
medium
sort + skip duplicates while backtracking
#90
Combination Sum II
medium
sort + skip duplicates, each element used once
#40
Word Search
medium
grid DFS backtracking with visited marking
B75
#79
Palindrome Partitioning
medium
backtracking over prefixes + palindrome check
#131
Letter Combinations of a Phone Number
medium
backtracking over digit → letters mapping
#17
N-Queens
hard
row-by-row backtracking with column/diagonal sets
#51
Tries
0/3
solved
Implement Trie (Prefix Tree)
medium
trie nodes with children map + end-of-word flag
B75
#208
Design Add and Search Words Data Structure
medium
trie + DFS branching on '.' wildcard
B75
#211
Word Search II
hard
build trie of words + grid DFS with pruning
B75
#212
Graphs
0/13
solved
Number of Islands
medium
flood fill DFS/BFS over grid
B75
#200
Max Area of Island
medium
DFS flood fill accumulating area
#695
Clone Graph
medium
DFS/BFS with hash map original → clone
B75
#133
Walls and Gates
medium
multi-source BFS from all gates
#286
Rotting Oranges
medium
multi-source BFS counting minutes
#994
Pacific Atlantic Water Flow
medium
reverse DFS from both ocean borders, intersect
B75
#417
Surrounded Regions
medium
DFS from border to mark unsurrounded regions
#130
Course Schedule
medium
cycle detection via topological sort / DFS states
B75
#207
Course Schedule II
medium
topological sort producing an ordering
#210
Graph Valid Tree
medium
union-find (or DFS): n-1 edges + fully connected, no cycle
B75
#261
Number of Connected Components in an Undirected Graph
medium
union-find (or DFS component count)
B75
#323
Redundant Connection
medium
union-find — first edge joining an existing set
#684
Word Ladder
hard
BFS over wildcard-pattern adjacency
#127
Advanced Graphs
0/6
solved
Network Delay Time
medium
Dijkstra's shortest path with min-heap
#743
Reconstruct Itinerary
hard
Eulerian path (Hierholzer's) with lexical ordering
#332
Min Cost to Connect All Points
medium
Prim's minimum spanning tree
#1584
Swim in Rising Water
hard
modified Dijkstra minimizing max elevation on path
#778
Alien Dictionary
hard
topological sort of character precedence graph
B75
#269
Cheapest Flights Within K Stops
medium
Bellman-Ford with k+1 relaxation rounds
#787
1-D Dynamic Programming
0/12
solved
Climbing Stairs
easy
Fibonacci-style bottom-up DP
B75
#70
Min Cost Climbing Stairs
easy
DP taking min of previous two steps
#746
House Robber
medium
DP rob-or-skip recurrence
B75
#198
House Robber II
medium
circular array — run house robber on two ranges
B75
#213
Longest Palindromic Substring
medium
expand around each center (odd/even)
B75
#5
Palindromic Substrings
medium
expand around center, count palindromes
B75
#647
Decode Ways
medium
DP over one- and two-digit decodings
B75
#91
Coin Change
medium
bottom-up unbounded knapsack (min coins)
B75
#322
Maximum Product Subarray
medium
track running max and min products (sign flips)
B75
#152
Word Break
medium
DP over prefixes with dictionary lookup
B75
#139
Longest Increasing Subsequence
medium
O(n^2) DP (or patience sorting + binary search)
B75
#300
Partition Equal Subset Sum
medium
subset-sum DP to half of total
#416
2-D Dynamic Programming
0/11
solved
Unique Paths
medium
grid path-count DP (row-by-row)
B75
#62
Longest Common Subsequence
medium
classic 2-D DP table on two strings
B75
#1143
Best Time to Buy and Sell Stock with Cooldown
medium
state-machine DP (buy/sell/cooldown)
#309
Coin Change II
medium
unbounded knapsack counting combinations
#518
Target Sum
medium
memoized DFS / subset-sum DP with offset
#494
Interleaving String
medium
2-D DP over prefixes of both strings
#97
Longest Increasing Path in a Matrix
hard
DFS + memoization per cell
#329
Distinct Subsequences
hard
2-D DP counting subsequence matches
#115
Edit Distance
medium
Levenshtein 2-D DP (insert/delete/replace)
#72
Burst Balloons
hard
interval DP choosing last balloon to burst
#312
Regular Expression Matching
hard
2-D DP / memoized recursion on '*' branches
#10
Greedy
0/8
solved
Maximum Subarray
medium
Kadane's algorithm (drop negative prefix)
B75
#53
Jump Game
medium
greedy furthest-reach (or work backwards from goal)
B75
#55
Jump Game II
medium
greedy BFS-style layer expansion
#45
Gas Station
medium
greedy running-total, reset start when negative
#134
Hand of Straights
medium
count map + greedily build runs from smallest card
#846
Merge Triplets to Form Target Triplet
medium
greedy: keep triplets with no value exceeding target
#1899
Partition Labels
medium
last-occurrence map + extend window to its end
#763
Valid Parenthesis String
medium
greedy min/max open-parenthesis count range
#678
Intervals
0/6
solved
Insert Interval
medium
linear scan: before / overlapping-merge / after
B75
#57
Merge Intervals
medium
sort by start + merge overlapping
B75
#56
Non-overlapping Intervals
medium
sort + greedily keep interval with earliest end
B75
#435
Meeting Rooms
easy
sort by start + adjacent overlap check
B75
#252
Meeting Rooms II
medium
sorted start/end arrays two pointers (or min-heap)
B75
#253
Minimum Interval to Include Each Query
hard
sort intervals + queries, min-heap by interval size
#1851
Math & Geometry
0/8
solved
Rotate Image
medium
in-place layer rotation (or transpose + reverse rows)
B75
#48
Spiral Matrix
medium
four shrinking boundary pointers
B75
#54
Set Matrix Zeroes
medium
use first row/column as zero markers (O(1) space)
B75
#73
Happy Number
easy
cycle detection (hash set or fast/slow pointers)
#202
Plus One
easy
right-to-left carry propagation
#66
Pow(x, n)
medium
fast exponentiation by squaring
#50
Multiply Strings
medium
digit-by-digit multiplication into result array
#43
Detect Squares
medium
point-count hash map, iterate diagonal candidates
#2013
Bit Manipulation
0/7
solved
Single Number
easy
XOR of all elements cancels pairs
#136
Number of 1 Bits
easy
bit shifting / n & (n-1) trick
B75
#191
Counting Bits
easy
DP: bits(i) = bits(i >> 1) + (i & 1)
B75
#338
Reverse Bits
easy
shift each bit into reversed position
B75
#190
Missing Number
easy
XOR indices with values (or Gauss sum)
B75
#268
Sum of Two Integers
medium
XOR for sum + AND-shift for carry loop
B75
#371
Reverse Integer
medium
digit pop/push with 32-bit overflow checks
#7