CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

The hash function hash: =key mod size and linear probing are used to insert the keys 37,38,72,48,96,11,56 into the hash table with indices 0 _____ 6 The order of the keys in the array are given by

A
98,11,37,38,72,56,48
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
98,56,37,38,72,11,48
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
11,48,37,38,72,98,56
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
72,11,37,38,56,98,48
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B 98,56,37,38,72,11,48

The hash function hash: =key mod size and linear probing are used to insert the keys 37,38,72,48,96,11,56 into the hash table with indices 0 to 6 The order of the keys in the array are given by 98,56,37,38,72,11,48.

Linear probing in hash tables:-

Linear probing is a scheme in computer programming for resolving collisions in hash tables, data structures for maintaining a collection of key value pairs and looking up the value associated with a given key. Along with quadratic probing and double hashing, linear probing is a form of open addressing.

A hash table is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Subdivided Bar Graph
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon