leaps.ggTRACK YOUR MASTERY →
PROBLEMS/TREES

Trees LeetCode Problems

253 hand-tagged Trees problems across 5 interview patterns (DFS Traversal (Inorder, Preorder, Postorder), BFS / Level-Order Traversal, BST Operations (Insert, Delete, Validate), Lowest Common Ancestor, Path Sum Problems), ranked by importance (how often each pattern shows up in real coding interviews). Work top-down within each pattern.

DFS Traversal (Inorder, Preorder, Postorder)

184 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Serialize and Deserialize Binary TreeMedium167289
BFS / Level-Order Traversal · Frequency Counting / Hash Map Lookup
2Maximum Depth of Binary TreeEasy102888
BFS / Level-Order Traversal
3Binary Tree Inorder TraversalEasy104888
4Invert Binary TreeEasy111288
BFS / Level-Order Traversal
5Diameter of Binary TreeEasy126788
+ 179 more DFS Traversal (Inorder, Preorder, Postorder) problems →

BFS / Level-Order Traversal

34 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Binary Tree Level Order TraversalEasy119592
2Binary Tree Right Side ViewEasy133785
DFS Traversal (Inorder, Preorder, Postorder)
3Amount of Time for Binary Tree to Be InfectedMedium171174
BFS Shortest Path (Unweighted) · DFS Traversal (Inorder, Preorder, Postorder)
4N-ary Tree Level Order TraversalEasy119873
5All Nodes Distance K in Binary TreeMedium166372
DFS Traversal (Inorder, Preorder, Postorder) · Frequency Counting / Hash Map Lookup
+ 29 more BFS / Level-Order Traversal problems →

BST Operations (Insert, Delete, Validate)

19 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Validate Binary Search TreeEasy134290
DFS Traversal (Inorder, Preorder, Postorder)
2Delete Node in a BSTMedium147682
DFS Traversal (Inorder, Preorder, Postorder)
3Insert into a Binary Search TreeEasy115278
4Construct Binary Search Tree from Preorder TraversalMedium156372
DFS Traversal (Inorder, Preorder, Postorder) · Monotonic Stack
5Inorder Successor in BSTPREMIUMEasy137871
DFS Traversal (Inorder, Preorder, Postorder)
+ 14 more BST Operations (Insert, Delete, Validate) problems →

Lowest Common Ancestor

13 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Lowest Common Ancestor of a Binary TreeEasy138787
DFS Traversal (Inorder, Preorder, Postorder)
2Lowest Common Ancestor of a Binary Search TreeEasy122285
BST Operations (Insert, Delete, Validate)
3Lowest Common Ancestor of a Binary Tree IVPREMIUMMedium142772
DFS Traversal (Inorder, Preorder, Postorder) · Frequency Counting / Hash Map Lookup
4Find Distance in a Binary TreePREMIUMMedium148772
DFS Traversal (Inorder, Preorder, Postorder)
5Lowest Common Ancestor of a Binary Tree IIPREMIUMMedium158072
DFS Traversal (Inorder, Preorder, Postorder)
+ 8 more Lowest Common Ancestor problems →

Path Sum Problems

3 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Path Sum IIIMedium153082
Prefix Sums · DFS Traversal (Inorder, Preorder, Postorder)
2Path SumEasy110778
DFS Traversal (Inorder, Preorder, Postorder)
3Path Sum IIEasy133972
Path Finding with Backtracking · DFS Traversal (Inorder, Preorder, Postorder)
EVERY PATTERN
Arrays & HashingTwo PointersStackBinary SearchSliding WindowLinked ListTreesTriesBacktrackingHeap / Priority QueueGraphsCore DPIntervalsGreedyAdvanced GraphsAdvanced DPBit ManipulationMath & Geometry
// your mastery
Bronze tier crystalSilver tier crystalGold tier crystalPlatinum tier crystalDiamond tier crystal
What's your Trees tier?

leaps.gg syncs your LeetCode history and scores your mastery of every pattern, then recommends the exact problems to do next with spaced repetition. Free to start.

GET MY MASTERY MAP →