public boolean isSymmetric(TreeNode root) {
        // Start typing your Java solution below
        // DO NOT write main() function

        if (root == null) {
            return true;
        } else {
            return compare(root.left, root.right);
        }

    }