public boolean isSymmetricRec(TreeNode t1, TreeNode t2){
        if((t1 == null && t2 != null) || (t1 != null && t2 == null))
            return false;
        if(t1 == t2) return true;
        if(t1.val != t2.val) return false;
        TreeNode tmp1 = t1.left;
        TreeNode tmp2 = t2.right;
        if(!isSymmetricRec(tmp1, tmp2)) return false;
        tmp1 = t1.right;
        tmp2 = t2.left;
        return isSymmetricRec(tmp1, tmp2);
    }