Algorithm · ByteDance · Medium
Given a list of lowercase strings words, partition them into groups. Two strings belong in the same group exactly when the letters of one can be rearranged to form the other, meaning both strings have identical character counts. Return all such groups together. Every group must contain only mutually anagram-equivalent strings, and no two different anagram classes may appear in the same group. The ordering of the groups is not important, and the ordering of strings inside…
Checking your access…