@@ -0,0 +1,765 @@
+# Definition for a binary tree node.%0A# class TreeNode(object):%0A#     def __init__(self, x):%0A#         self.val = x%0A#         self.left = None%0A#         self.right = None%0A%0Aclass Solution(object):%0A    def convertBST(self, root):%0A        %22%22%22%0A        :type root: TreeNode%0A        :rtype: TreeNode%0A        %22%22%22%0A        def leftMost(node, r_ancestor):%0A            if not node:%0A                return None%0A            %0A            r_min = leftMost(node.right, r_ancestor)%0A            if r_min:%0A                node.val += r_min.val%0A            elif r_ancestor:%0A                node.val += r_ancestor.val%0A            %0A            l_min = leftMost(node.left, node)%0A            return l_min if node.left else node%0A            %0A        leftMost(root, None)%0A        return root%0A

Create ConvBST2GreaterTree.py