Compute subtree sums with tree DFS | Netflix Interview Question