โ† Amazon questions

Replace each node value with sum of all nodes occurring to its right

Filed under Amazon

Given a Binary Search Tree (or binary tree), modify it such that each node's value is replaced with the sum of all values greater than or equal to that node's value in the original tree.

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.