← Amazon questions

Sum Tree and Alternate Array

Filed under Amazon

Part 1: Convert a binary tree to a Sum Tree where each node's value is replaced by the sum of its left and right subtrees. Part 2: Rearrange an array to alternate positive and negative numbers while…

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.