
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: DATA STRUCTURES; Subject: Computer Science - CSCI; University: Texas A & M University-Commerce; Term: Fall 2004;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Fall 2004 Due: Thursday, 9 Dec
Emphasis on: Hash Tables
Create a HashTable class that uses chaining to resolve collisions and random hshing for the hash function. Your hash table class need only be designed to hold integer values. Implement the basic operations for a hash table including constructors, destructors, insert and item and search or retrieve an item.
Requirements
for the ADDEND and 2231 for the MODULUS
class from assignment 4 as the basis of the linked list / chain that you create to resolve collisions.
Extra Credit Use a template to allow your hash table to hash not just integer keys, but a new class you define called HashItem. HashItem should include a function called getHashKey() that returns a hash key to be used by your class. Inherit from HashItem to create IntHashItem and FloatHashItem that hold an integer and float value and calculate an appropriate hash key to be used by your template hash table.