@@ -0,0 +1,486 @@
+/**%0A * Definition for a binary tree node.%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0A%0Apublic class Solution %7B%0A%0A    private int sum = 0;%0A%0A    public TreeNode convertBST(TreeNode root) %7B%0A%0A        if (root == null) %7B%0A            return null;%0A        %7D%0A%0A        convertBST(root.right);%0A%0A        root.val += sum;%0A        sum = root.val;%0A%0A        convertBST(root.left);%0A%0A        return root;%0A%0A    %7D%0A%0A%7D%0A

Create : 538 Convert BST to Greater Tree