Both Trie and HashMap can't pass this problem in C++.
I'd tried several methods that posted in the discussion/premium solution, all of them got TLE.
There is another one also noticed this issue, see https://leetcode.com/problems/palindrome-pairs/discuss/1660351/some-edge-test-cases-may-trigger-TLE-for-official-solutions
Can someone take a look at this? Thanks.