Core Skill

Problems

Patterns

key = tuple(sorted(word))

or

key = (x,y)

When to use

Many problems implicitly use compound / composite keys (often encoded as tuples, strings, or multiple fields).


Core problems (directly applicable)

1. Grouping by multiple attributes

🔹 Group Anagrams

key = tuple(counts)  # composite representation

Why it matters:

You learn to collapse multiple features into one hashable key, which is exactly what (client, time_bucket) does.