For this assignment you are to implement a Table class using hash functions with open
addressing and linear probes for collision resolution. When you are done, use this class
to implement a solution to the word counting problem. The one relaxation is that the
words in the input do not need to be printed in alphabetical order.
a) You are to implement a class called Table and place it and all its
supporting code in a file called table.py. Your class must support the following
t = Table(100)
o creates table that is estimated to hold no more than 100 entries; without a parameter, the default limit is 500.
o you can use a fixed-size Python list or a NumPy array, whatever you find most convenient. Please note that for efficient lookup, your actual table size should be a prime number at least 1.5 times the limit value provided (you want your load factor to be less than 2/3).
o you should handle the situation where the limit value is exceeded; in our
testing we will try to do this
Get Free Quote!
418 Experts Online