Engineering-Mathematics
April 29, 2024Probability-and-statistics
April 29, 2024Question 5218 – UGC NET CS 2018 JUNE Paper-2
Consider a hash table of size seven, with starting index zero, and a hash function (7x+3) mod 4. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing ? Here “__ ” denotes an empty location in the table.
Correct Answer: A
Question 70 Explanation:
h(1)= ((7*1)+3) mod 4 = 2
h(3)= ((7*3)+3) mod 4 = 0
h(8)= ((7*8)+3) mod 4 = 3
h(10)= ((7*10)+3) mod 4 = 1
h(3)= ((7*3)+3) mod 4 = 0
h(8)= ((7*8)+3) mod 4 = 3
h(10)= ((7*10)+3) mod 4 = 1
3, 10, 1, 8,___ ,___,___.
1, 3, 8, 10,___,___,___.
1,___,3,___, 8,___,10
3,10,___,___, 8,___,___.
Subscribe
Login
0 Comments