Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
A string is a palindrome if the number of characters with an odd frequency is either 0 or 1.
Let mask[v] be a mask of 26 bits that represent the parity of each character in the alphabet on the path from node 0 to v. How can you use this array to solve the problem?