
CS 302 Assignment 8:
Implementation of a Hash Table
Due date: Monday, April 9, 2018, midnight.
All programming assignments must be
submitted electronically.
Submit them to the graduate assistant, Kaushik Deshmukh
by email
on or before the due date.
Your email must come from your university or engineering college account,
and your programs must compile and run on College computers.
The assignment is to write a program that uses a hash table.
The data will all be 3 letter names.
You should have a hash table class.
Initialize your hash table to have size 10.
Read commands from
this file.
You will need to rehash sometimes.
When I ran my program, I executed rehash when the number of deletion marks
exceeded he number of blank spaces. Perhaps that is a bit too often? You
decide.
Your program should give a warning message if it cannot find a name which is
supposed to be deleted, or there is no room in the table for a new datum,
or the datum to be inserted is already in the table. It should also indicate
when rehash is executed.
I used linear probing. Unfortunately, it causes
secondary clustering, which is obvious from
my outfile.
There is certainly a better way to do probing.
Run your program a second time, where the size of the hash table is 25.
Here is an input file for a hash table of size 25