Algorithm · C3.ai · Easy
You are given an array of strings strs. Partition the strings into groups so that two strings land in the same group exactly when one is an anagram of the other, meaning both contain the same characters with the same counts, just possibly arranged in a different order. Return the collection of groups. The order of the groups in the result does not matter. Examples Example