Given an array of strings strs, group the anagrams together. You can return the answer in any order.
An anagram is a word formed by rearranging the letters of another word, using all the original letters exactly once.
strs = ["eat","tea","tan","ate","nat","bat"][["bat"],["nat","tan"],["ate","eat","tea"]]strs = [""][[""]]strs = ["a"][["a"]]1 <= strs.length <= 10^40 <= strs[i].length <= 100strs[i] consists of lowercase English lettersExpected time complexity: O(n*k)Run your code to see results
Use Cmd+Enter to run