Hi everyone!
Quite recently, a problem named Palindromes in Deque was added to the Library Checker that asks you to execute the following:
- Add a character $$$c$$$ to the beginning or the end of a string $$$s$$$;
- Remove a character from the beginning or the end of $$$s$$$.
In-between the queries you also need to maintain the number of distinct palindromes, and the size of the largest prefix- and suffix-palindromes of the current string.