What does anagrams mean?

  • 0

    I don't understand the problem, any examples?

  • 1

    it means strings having same characters.
    Ex: 'abc', 'acb', 'bca' are anagrams

    in this question, you should return all the string which are anagrams.

  • 0


    "An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; for example, the word anagram can be rearranged into nag-a-ram."

    Actually a word should not be considered anagram of it self. Thus we shouldn't group "", ""; or "ant","ant". But leetcode considers them as anagrams.

    In my opinion, these test cases should be removed and have the constraint that no duplicates exists; or we can actually just ignore duplicates~

  • 0

    and what if we had several groups of anargrams, should we then return all groups?

  • 0

    I have the same question. Maybe we can assume that there is only one such group.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.