public boolean visit(TreeNode left, TreeNode right){
        if(left == null && right == null) return true;
        else if(left != null && right != null){
            if(left.val != right.val) return false;
            else return (visit(left.right, right.left) 
                        && visit(left.left, right.right));
        } else return false;
    }