โ† Amazon questions

Convert a given tree to sum tree

Filed under Amazon

Given a binary tree, convert it into a Sum Tree where each node contains the sum of its left and right subtrees in the original tree. Leaf nodes are given a value of 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.