Explore detailed execution
Every row is a meaningful action from this stored run. Select one to inspect its saved state and optional Java reference.
Return to the interactive table and try a different key.
Expected constant time with a well-distributed hash.
O(n + m)Each key occupies one slot; collisions probe the next slot and wrap around.
Choose a scenario to follow the structure.
A hash function chooses a bucket. Separate chaining stores every key assigned to that bucket in a linked chain. To insert, look up, or remove a key, compare the complete key at each node.
Worked example. Java hashes "11" to 1568 and "98" to 1823. Both have remainder 3 modulo 5. Inserting 98 → dog beside 11 → cat creates two distinct nodes in bucket 3.
Which bucket will this key use?
The explanation follows the selected Java line and live table state.
Each key occupies one slot; collisions probe the next slot and wrap around.
Insert and update key-value pairs, then look them up or test membership. Keep the load factor at or below one half by doubling the table before a put crosses that limit.
Press Play to see what happens.
Scroll to follow how your operation changes the table.
Every row is a meaningful action from this stored run. Select one to inspect its saved state and optional Java reference.
Return to the interactive table and try a different key.