← Amazon questions

Sum of numbers formed by root-to-leaf paths

Filed under Amazon · Also reported at Deliveroo

Given a binary tree where each node contains a single digit (0-9), each root-to-leaf path represents a number. Calculate the total sum of all root-to-leaf numbers.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

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