Group Anagrams, solved two ways

Try:
CALL
1 / 1

Code

The highlighted line runs next. The pill shows the live values in the running call.

Cost

Work done so far, and how the two solutions compare

Words

Grouped words take their group's colour

Keyboard: ← → step, Space play or pause. Up to 10 comma-separated words of up to 8 lowercase letters; write "" for an empty string. The groups come out in first-seen order here (like Python's dict); Java's HashMap and C++'s unordered_map may list them in a different order, which the problem allows.