• Home
  • Blog
  • GU Implementing Hashing Algorithm and Python Worksheet

GU Implementing Hashing Algorithm and Python Worksheet

0 comments

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.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}