~/boss / monster-vault

Hash map (buckets and chaining)

The Monster Vault

Store every monster in one step. Then fetch them back in one step.

Loading the fight…

How to beat it

Add up the letters of a monster's name (A = 1 … Z = 26) and take the remainder by 8: that's its bucket. Store it there, look for it there and nowhere else. Two names in one bucket? It keeps a short list, so walk it.

Now the real boss

Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.

On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/design-hashmap there. Sign in with your email to keep your progress on every device.

More bosses

esc