โ† Josh Technology questions

Sum of Numbers Formed by Leaf-to-Root Paths

Filed under Josh Technology

The question

Given a tree where each leaf-to-root path represents a number, return the sum of all such numbers in O(N) time and O(1) space.

No write-up yet. Related questions below have one.

Related Josh Technology questions

Collected from public candidate posts and coding forums. Updated Nov 2026.