Back to QuestionsPractice with This Question
Convert BST to Greater Tree
71.4K views•Asked 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.