Sius Posted November 17, 2018 Share Posted November 17, 2018 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now