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