[SOLVED] CSE341 Assignment 1

30.00 $

Category: Tags: , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment1-n6psd0.zip (45.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Your task is to write a class which stores numbers using LISCH. You are provided with a header file which has the class definition inside; and a source file which you are supposed to complete.

You have five member functions to implement:

● Constructor for the class: The parameter passed to the constructor represents the

desired size of the hash table. Write necessary code to accommodate this.

● insert: The parameter passed is the value to be inserted into the hash table. Write

necessary code to insert this value to the hash table using LISCH logic.

● find_num_probes: This function’s job is to find out how many β€˜hops’ are required to find a certain key inside the hash table. Note that the number of probes for a given key must be at least 1 (i.e. if you find the key directly without following any links, the result should be 1). The parameter passed is the key to be searched for in the hash table. You can assume that the searched key always exists in the table.

● find_average_num_probes: Computes average number of probes required to find a key in this table. Find how many probes it takes to find all keys inside the hash table, and divide it by the number of valid entries.

● does_include:Β  Returns whether a given key exists inside the hash table or not.

DO NOT

make any changes to the header file.

DO NOT

send a main function along with your work.

DO NOT

change the names of the files.

​ ​   ​ ​   ​ ​

  • Assignment1-n6psd0.zip