private boolean isSubtreeSymmetric(TreeNode n1, TreeNode n2) {
        if (n1 == null && n2 == null) return true;
        if (n1 == null || n2 == null) return false;
        if (n1.val != n2.val) return false;
        return isSubtreeSymmetric(n1.left, n2.right) &&
               isSubtreeSymmetric(n1.right, n2.left);
    }