Question: c++ Chained Hashing Suppose that you are going to implement (without use of the STL) a chained hashing scheme for objects of class Student, using
c++ Chained Hashing
Suppose that you are going to implement (without use of the STL) a chained hashing scheme for objects of class Student, using a hash over the perm number, using chained hashing. Suppose that a constant ARRAY_SIZE has been defined as the size of an array, and each element in that array should be the head of a linked list of Students that hashes to the index of that element.
a)Write a C++ definition for a struct that can represent a node in each of these linked lists.
b)Write a line of C++ that, if it appeared in the private: section of the class definition for class StudentHashTable, would represent a suitable array for the values, assuming that array was allocated on the heap in the constructor of class StudentHashtable
c) Write the definition of the constructor for StudentHashTable as it would appear in the .cpp file. Be sure to both allocate the space for the array on the heap, and set all of the pointers in that array to null.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
