Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Input: strs = ["eat","tea","tan","ate","nat","bat"]
Output: [["bat"],["nat","tan"],["ate","eat","tea"]]
Topics: arrays, hash-map, sorting
Asked by: Amazon, Google, Meta, Microsoft, Apple, Bloomberg, Uber
Time complexity: O(n k log k). Space complexity: O(n k).