These are the hash table problems every placement candidate should be able to solve: slots and chains, linear probing, sets and counts, and cache designs. Pick the structure first, a set, a dictionary of counts or a dictionary with a second structure. Trace a small input by hand, then check your program against every test.