← 返回 ibm 的题目列表Group Words by Character Frequency
类型:online_judge
Group Words by Character Frequency
Given a list of strings words, group the words with the same frequency of characters and return the number of groups.
Input
A list of words words where the word length is in [1, 100], and the list length is in [1, 10^3], only containing lowercase letters.
Output
Return the total number of groups.
Example
Input
["cat", "tac", "net", "ten", "god"]
Output
3
Note
Words formed with the same set of letters should be considered as belonging to the same group regardless of the order of the letters.
Example
Input
cat tac net ten god