Meta and Microsoft ask this problem frequently. It tests whether you can design a hash key for grouping, which is a pattern that appears everywhere. The interviewer will often ask: "Can you do better than sorting?" This is your chance to show the character-count approach that runs in instead of . This pattern extends to grouping any objects by some canonical form: grouping files by content hash, grouping users by behavior pattern, grouping transactions by category.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/arrays-hashing/group-anagrams-why-this-problem
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████████████████████████████████████████████████████████████████████████████████████████████