...
Question 15145 – DSSSB TGT 2021
January 14, 2024
Question 8497 – GATE 2014 [Set-1]
January 15, 2024
Question 15145 – DSSSB TGT 2021
January 14, 2024
Question 8497 – GATE 2014 [Set-1]
January 15, 2024

Question 11052 – Algorithms

A hash table contains 10 buckets and uses linear probing to resolve collisions. The key values are integers and the hash function used is key % 10. If the values 43, 165, 62, 123, 142 are inserted in the table, in what location would the key value 142 be inserted?

Correct Answer: D

Question 4 Explanation: 
43%10 = 3 [occupy 3]
165%10 = 5 [occupy 5]
62%10 = 2 [occupy 2]
123%10 = 3 [3 already occupied, so occupies 4]
142%10 = 2 [2, 3, 4, 5 are occupied, so it occupies 6]
A
2
B
3
C
4
D
6
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!!