Input: words[] = { "may", "student", "students", "dog",
"studentssess", "god", "cat", "act",
"tab", "bat", "flow", "wolf", "lambs",
"amy", "yam", "balms", "looped",
"poodle"};
Output :
looped, poodle,
lambs, balms,
flow, wolf,
tab, bat,
may, amy, yam,
student, students, studentssess,
dog, god,
cat, act,
Explanation :
All words with same set of characters are printed together in a line.
Outputlooped, poodle,
student, students, studentssess,
may, amy, yam,
dog, god,
cat, act,
tab, bat,
lambs, balms,
flow, wolf,