Practice36 min
Practice: Recursive Foundations
The six canonical easy DFS problems — each one a variation of return-height-while-checking.
Six easies that are really one skeleton: base case, recurse on children, combine. Diameter and Balanced introduce the return-one-thing-track-another pattern.
Problems0 of 6 solved
- Not startedInvert Binary Treerecursive DFS swapping childreneasy
- Not startedMaximum Depth of Binary Treerecursive DFS deptheasy
- Not startedDiameter of Binary TreeDFS returning height while tracking max diametereasy
- Not startedBalanced Binary Treebottom-up DFS height with balance checkeasy
- Not startedSame Treeparallel recursive DFS comparisoneasy
- Not startedSubtree of Another TreeDFS + same-tree check at each nodeeasy