public boolean compareBinaryTree(final TreeNode t1, final TreeNode t2) {
        if (t1 == null && t2 == null) {
            return true;
        }
        if ((t1 != null && t2 == null) || (t2 != null && t1 == null)) {
            return false;
        }
        return (t1.value == t2.value)
                && compareBinaryTree(t1.left, t2.left)
                && compareBinaryTree(t1.right, t2.right);
    }