Jump to content

Hash Table Linked List Length

Featured Replies

A hash table with chaining is required to hold 10000 records. Each record is indexed by the 2-character initials of the user's name, transformed into integers using the mapping: A=01, B=02,...,Z=26. Ideally, on average, no more than 8 comparisons should be made every time a search is requested.

For example, John Doe:

John Doe = JD

J = 10

D = 04

JD = 1004

The hash function (multiplication hash): h(k) = m(kA - kA)

k = 2-character initials as an integer (e.g, 1004)

A = 0.6180339887

m = 1000

In this case, how do you compute the average length of the linked lists, in the hash table, that is pointed to by the hash value slots?

 

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.