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
Explain the theory of computational complexity A  problem's  intractability  remains  the  similar  for  all  principal  models  of   computations    and   all reasonable inpu

What do you understand by term structured programming? Explain the structured programming as well.                                 Ans. S tructured Programming is expla

An undirected graph G with n vertices and e edges is shown by adjacency list.  What is the time required to generate all the connected components? O (e+n)

A driver takes shortest possible route to attain destination. The problem which we will discuss here is similar to this type of finding shortest route in any specific graph. The gr

D elete a specific Node from Double Linked List as follows DELETEDBL(INFO, FORW, BACK, START, AVAIL,LOC) 1. [Delete Node] Set FORW [ BACK [LOC]]:= FORW[LOC]& BACK [FORW[

Write down any four applications of queues.            Application of Queue (i)  Queue is used in time sharing system in which programs with the similar priority form a queu

State the example of pre- and post-conditions Suppose that function f(x) should have a non-zero argument and return a positive value. We can document these pre- and post-condit

Question 1 Write a program in 'C' to read N numbers and print them in descending order Question 2 Discuss the properties of ADT Question 3 Write a note on

i need the full concept of it... please can anyone provide

Queue is a linear data structure utilized in several applications of computer science. Such as people stand in a queue to get a specific service, several processes will wait in a q