Back to DashboardUpgrade
Pro pattern
Upgrade to Pro to access this pattern and all 22 patterns.
PATTERN
Trees (DFS)
Explore binary trees using depth-first search. Master recursive traversals (preorder, inorder, postorder), state passing through call stacks, bottom-up computation, and iterative DFS with an explicit stack.
Learn Trees (DFS)Explanation, templates & reference
Maximum Depth of Binary Tree
easy
Invert Binary Tree
medium
Validate Binary Search Tree
medium
Lowest Common Ancestor of a Binary Tree
medium
Binary Tree Right Side View
medium
Serialize and Deserialize Binary Tree
hard