Hash table, Data Structure & Algorithms

Assignment Help:

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


Related Discussions:- Hash table

Search engines - applications of linear and binary search, Search engines e...

Search engines employ software robots to survey the Web & build their databases. Web documents retrieved & indexed through keywords. While you enter a query at search engine websit

Tree traversals, There are three kinds of tree traversals, namely, Postorde...

There are three kinds of tree traversals, namely, Postorder , Preorder and Inorder. Preorder traversal: Each of nodes is visited before its children are visited; first the roo

What is assertions and abstract data types, Assertions and Abstract Data Ty...

Assertions and Abstract Data Types Even though we have defined assertions in terms of programs, notion can be extended to abstract data types (which are mathematical entities).

Operations on sequential files, Insertion: Records has to be inserted at t...

Insertion: Records has to be inserted at the place dictated by the sequence of keys. As is obvious, direct insertions into the main data file would lead to frequent rebuilding of

Lists, In the earlier unit, we have discussed about the arrays. Arrays are ...

In the earlier unit, we have discussed about the arrays. Arrays are data structures of fixed size. Insertion & deletion involves reshuffling of array elements. Thus, arraymanipulat

Designed to manage the booking, Beauty Salon is a system to be designed to...

Beauty Salon is a system to be designed to manage the booking and the payment of a single beauty parlour. Beauty Therapists: A beauty parlour has a number of staff members mo

Which of the sorting algorithm is stable, Which of the sorting algorithm is...

Which of the sorting algorithm is stable   Heap sorting is stable.

Linked list implementation of a dequeue, Double ended queues are implemente...

Double ended queues are implemented along doubly linked lists. A doubly link list can traverse in both of the directions as it contain two pointers namely left pointers and righ

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd