public class Solution {
    TreeNode head = null;
    TreeNode realHead = null;
    public TreeNode Convert(TreeNode root) {
        if(root == null) return null;
        if(root.left != null) Convert(root.left);
        if(head == null){
            head = root;
            realHead = root;
        }else{
            head.right = root;
            root.left = head;
            head = root;
        }
        Convert(root.right);
        return realHead;
    }
}
这个思路清晰好多,网上其他的看的我有点混乱。。。