This week's assignment is to make your own Hash Table.
- Use whatever language you want
- Don't use a built in implementation provide by the language (I mean, c'mon :) )
- A hash table should let get and put elements using a string key, eg.
hash.put("foo", "this is a thing")
hash.get("foo") # returns "this is a thing"
- Implement a hash function which given the key, returns an index
- Store values in an array using the index
- Initial version can throw an exception when you try to put into the hash and encounter a key collision.
- For extra credit, come up with a key collision strategy.