Strings

Group Anagrams

medium
Given an array of strings `strs`, group the anagrams together. You can return the answer in any order. Two strings are anagrams if they contain the same characters with the same frequencies. Example: `groupAnagrams(["eat","tea","tan","ate","nat","bat"])` → groups like `[["bat"],["nat","tan"],["ate","eat","tea"]]`.
Hint steps(0/3 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.

  3. 3

    Complete previous step or reveal to unlock this hint.