Write a Python program and provide the outputs.
Part A): Creating Hash table
- Given a hash table of size 35, create a hash table with 32 AU/CS students’ IDs (5 digits ID), using division hash function with largest prime# <= hash table size and Linear probing for Overflow/Collision handling. After creating the hash table, print the average number of probing in creating the hash table.
- Search for a Key in the hash table (try 4 different keys). Print appropriate messages (key found, or key does not exist in the hash table). Also, after the searches, print the average number of probing.
Part B):
Repeat Part A with Hash table size of 50. (Use the same 32 students as in Part A) & (Use the same 4 keys for searching as in section 2 of Part A).Does the increase in hash table size decrease the number of probing? Explain your findings.


0 comments