Back to Questions

Convert BST to Greater Tree

71.4K viewsAsked at Google
Medium

Question Explain

Given the root of a BST, convert it to a Greater Tree such that every key is changed to the original key plus the sum of all other keys greater than the original key. Use reverse in-order traversal.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Convert BST to Greater Tree - Interview Question