LeetCode 49 Group Anagrams - Problem Statement

The problem

LeetCode 49 Group Anagrams gives you an array of strings. Your task is to group the anagrams together. Anagrams are words with the same letters rearranged.

For example, if strs = ["eat","tea","tan","ate","nat","bat"], you'd return [["eat","tea","ate"],["tan","nat"],["bat"]]. Notice "eat", "tea", and "ate" all have the same letters.

Before moving on, think: how can you quickly tell if two strings are anagrams? And how can you use that to group them efficiently?

Constraints: 1n1041 \le n \le 10^4, string length up to 100100.