Problem statement
Design a table that stores a value under a whole-number key, reads it back, and removes it. Each operation must read one slot's chain rather than everything stored.
The number of slots is fixed when the table is built, and reading a key that is absent answers -1.
Examples
Inputput(1, 10), put(2, 20), put(11, 30), get(11)
Output30
11 and 1 share slot 1, and the chain holds both.
Inputput(1, 10), put(1, 20), get(1)
Output20
A repeated key overwrites its value instead of being stored twice.
The walkthrough is part of Premium
The statement and the examples above stay free. The full how-to-solve walkthrough, the cost notes in plain words and the interactive step-by-step visualizer unlock with a Premium plan.
See pricing