Question: C++ help: I need help to create a program using hash table, hash function, and sequential search using the requirements below. a) Create an array
C++ help: I need help to create a program using hash table, hash function, and sequential search using the requirements below.
a) Create an array of 4-digits student IDs of Size 500 using the random generator function.
b) Use division method for a hash function H and a hash table of size m, a prime number, store your data of 4-digits student IDs (n = 500) to a hash table where each cell is chained to a link list.
b) Use a sequential search function to search a student-ID. For each search, print the ID to be searched and count the number of times the sequential search function has gone through. Print the count for each search.
c) Do 20 searches 17 with ID found and the other three with ID not found.
d) Use a counter during the searches to compute the line of statements each searching goes through (which is the computation time).
e) Display ID to be searched and the result for each search with the computation time by counting the number of times the sequential search function has gone through.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
