This is the simplest tree recursion problem and a perfect warm-up. It solidifies the recursive thinking pattern: solve for the current node, then recurse on children.
Enable JavaScript for the full StreamPrep guide.