โ† Amazon questions

Tree to Sum Tree

Filed under Amazon

Given a binary tree, convert it into a Sum Tree where each node's data is replaced with the sum of all its left and right subtrees' values. Leaf nodes become 0.

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.