SoundHound Interview Question

How to write code to group palindrome words among themselves using C++?