Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

UGC-NET | UGC NET CS 2015 Jun – III | Question 34

  • Last Updated : 19 Jun, 2018

Consider a hash table of size m = 100 and the hash function h(k) = floor(m(kA mod 1)) for
Compute the location to which the key k = 123456 is placed in hash table.
(A) 77
(B) 82
(C) 88
(D) 89


Answer: (C)

Explanation: h(k) = floor(m(kA mod 1))
M = 100; k = 123456
h(k) = floor(100(123456 * 0.618033 mod 1))
h(k) = floor(100(76189.882048 mod 1))
h(k) = floor(100 * 0.882048)
h(k) = floor(88.2048)
h(k) = 88.
So, option (C) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!