Which of the following operations are done in a hash table?

Category: QuestionsWhich of the following operations are done in a hash table?
Editor">Editor Staff asked 4 weeks ago

Which of the following operations are done in a hash table?
 
(a) Insert only
 
(b) Search only
 
(c) Insert and search
 
(d) Replace
 
I’m obligated to ask this question of Hash Tables in chapter Hash Tables of Data Structures & Algorithms I
 
I got this question in a national level competition.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Correct answer is (c) Insert and search
 
Easiest explanation – Hash tables are used to implement Insert and Find operations in constant average time. This is the prime purpose of hashing.