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)Books with colliding ISBN hashes are appended to the bucket’s linked list.
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.
Books with colliding ISBN hashes are appended to the bucket’s linked list.
Follow add, get, and delete for signed 32-bit ISBNs. Watch colliding books stay in chain order and see existing books rehashed when capacity doubles.
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.