2018-12-05 leetcode Convert BST to Greater Tree Convert BST to Greater TreeRecursive Version - 88ms 12345678910111213141516171819202122# Definition for a binary tree node.# class TreeNode:# def __init__(self, x):# self.val = x# self.left = None# self.right = Noneclass Solution: def __init__(self): self.lSum = 0 def convertBST(self, root): """ :type root: TreeNode :rtype: TreeNode """ if not root: return None self.convertBST(root.right) self.lSum += root.val root.val = self.lSum self.convertBST(root.left) return root leet code Newer House Robber III Older Find All Numbers Disappeared in an Array