...
Question 16900 – Data-Structures
May 23, 2024
Question 6354 – Data-Structures
May 23, 2024
Question 16900 – Data-Structures
May 23, 2024
Question 6354 – Data-Structures
May 23, 2024

Question 6861 – Data-Structures

Consider a hash table of size m = 10000, and the hash function h(K) = floor (m(KA mod1)) for A = ( √(5) – 1)/2. The key 123456 is mapped to location ______.

Correct Answer: B

Question 525 Explanation: 
Given data,
— Hash table size(m)=10000
— Hash function(h(K))= floor (m(KA mod1))
— A=(√(5)-1)/2
— key(K)=123456
— location=?
Step-1: Hash function(h(K))= floor (m(KA mod1))
h(123456) = floor(10000 * (123456 * (√5 − 1) / 2) mod 1)
= floor(10000 * (76300.004115 mod 1)
= floor(10000 * (.004115))
= floor(41.15)
= 41
A
46
B
41
C
43
D
48
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!