It means return all group of anagrams being flatten into one single list.
For the input ["dog","cat","god","tac"]
, it should return: ["dog","cat","god","tac"]
, as dog
and god
are one group of anagrams, and cat
and tac
are another group of anagrams.
I will probably change the return format to a more intuitive manner sometime in the future, such as:
[
["dog", "god"],
["cat", "tac"]
]
Until this change happens, you will have to deal with the slightly confusing way of returning a flatten list, which should not affect the algorithm itself.