← Questions

All root-to-leaf path sums

0
MetaCodingLast asked Dec 2025

Return a list with the sum of the values along every root-to-leaf path of a binary tree, one entry per leaf, in left-to-right order.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding