← Questions

Sum root-to-leaf numbers

0
MetaCodingLast asked Aug 2026

Each node of a binary tree holds a digit, so every root-to-leaf path spells a number. Return the sum of all those numbers.

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