You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.</p>
<p>
<b>Example:</b>
<pre>
<b>Input:</b> The root of a Binary Search Tree like this:
5
/ \
2 13
<b>Output:</b> The root of a Greater Tree like this: