思路:ST的中序遍历就是从小到大,那么反过来就是从大到小,然后通过num累加
int num =0;
public TreeNode convertBST(TreeNode root) {
if(root!=null){
convertBST(root.r);
root.val+=num;
num = root.val;
convertBST(root.l);
return root;
}
return null;
}