Two strings are considered anagrams if they contain the same characters with the same frequencies, but the arrangement of characters may differ.
Example 1:
Input: strs = ["eat","tea","tan","ate","nat","bat"]
Output: [["bat"],["nat","tan"],["ate","eat","tea"]]
Explanation: The strings "eat", "tea", and "ate" are anagrams of each other because they contain identical characters with the same frequencies.
Example 2:
Input: strs = [""]
Output: [[""]]
Explanation: The array contains a single empty string, so it forms its own group.
Example 3:
Input: strs = ["a"]
Output: [["a"]]
Explanation: Since there is only one string, it becomes a single anagram group.