Don't Google the answer/the angle of attack.
During a 45minute Facebook job interview you could be requested to write a C++ from scratch that does this:
You have a list of these words
"tsar", "rat", "tar", "star", "tars", "cheese"
re-arrange them so the anagrams (words that have the same letters) are grouped together.
output order not important.