Hash table, Data Structure & Algorithms

Q. Make the 11 item hash table resulting from hashing the given keys: 12, 44, 13, 88, 23, 94, 11, 39, 20, 16 and 5 by making use of the hash function h(i) = (2i+5) mod 11.     

Ans.

The size of the table is  11

h(12) = (24+5) mod 11 = 29 mod 11 = 7

h(44) = (88+5) mod 11 = 93 mod 11 = 5

h(13) = (26+5) mod 11 = 31 mod 11 = 9

h(88) = (176+5)mod 11= 181mod 11 = 5

h(23) = (46+5) mod 11 = 51 mod 11 = 7

h(94) = (188+5)mod 11= 193mod 11 = 6

h(11) = (22+5) mod 11 = 27 mod 11 = 5

h(39) = (78+5) mod 11 = 83 mod 11 = 6

h(20) = (40+5) mod 11 = 45 mod 11 = 1

h(16) = (24+5) mod 11 = 29 mod 11 = 4

h(5) = (10+5) mod 11 = 15 mod 11 = 4

1648_hash table.png

Posted Date: 7/12/2012 8:37:30 AM | Location : United States







Related Discussions:- Hash table, Assignment Help, Ask Question on Hash table, Get Answer, Expert's Help, Hash table Discussions

Write discussion on Hash table
Your posts are moderated
Related Questions
Operations on B-Trees Given are various operations which can be performed on B-Trees: Search Create Insert B-Tree does effort to minimize disk access and t

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Write down any four applications of the queues.                                                            Ans. A pp li cation of Queue is given below (i)  Queue is

#question.show that the following inequality is correct or incorrect. n!=O(n^n)

what is an algorithms

QUESTION Explain the following data structures: (a) List (b) Stack (c) Queues Note : your explanation should consist of the definition, operations and examples.

Q. Describe the term array.  How do we represent two-dimensional arrays in memory?  Explain how we calculate the address of an element in a two dimensional array.

Define Big Theta notation Big Theta notation (θ) : The upper and lower bound for the function 'f' is given by the big oh notation (θ). Considering 'g' to be a function from t

Define about the class invariant A class invariant may not be true during execution of a public operation though it should be true between executions of public operations. For

Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge