Given a collection of strings, partition them into groups where each group consists of strings that are compositions of the same characters, regardless of order.
Explanation: The strings 'listen', 'silent', 'enlist', and 'inlets' are all anagrams of each other, while 'banana' forms its own group.
Explanation: The strings 'eat', 'tea', and 'ate' form one group, 'tan' and 'nat' form another, and 'bat' forms its own group.
Group strings by character composition
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak