LeetCode 49: Group Anagrams, from Scanning Groups to Building a Grouping Key
Build a Python solution one step at a time: compare two anagrams, scan group representatives, then derive sorted-string and character-count keys to understand why hash-table grouping works.