Hash Table with Chaining

Implement a HashTable using separate chaining: each bucket is a list. put(key, value) should update an existing key in its chain, or append a new one. get(key) should return the value, or None if not found.

Read the table size, then the number of key-value pairs to insert, then that many "key value" pairs. Then read the number of queries, then that many keys, printing each one's value (or "Not found").

main.py
Loading editor…

Console

Run your code to see output here.