โ† Amazon questions

Replace node with sum of greater nodes

Filed under Amazon

Given a Binary Search Tree (BST), replace every node with the sum of all nodes greater than or equal to it. The maximum node should be replaced with 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.