Question: Write a C++ program that implements the linear probing as a user-defined function and then calls it in the main to insert the keys
Write a C++ program that implements the linear probing as a user-defined function and then calls it in the main to insert the keys 19, 28, 49, 52, 33, 40 and 34 into a hash table of size 12. Let us suppose that we are using the following hash function: hash(key) = key mod 12. The linear probe collision resolution function f(i) = 2i. The main function will display at the end content of the hash table. (a) Modify the main function in a way to ask the user to enter the size of the hash table as well as the number of keys he/she wants to insert in this table.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
