What is the advantage of a hash table over BST?

(a) hash table has a better average time complexity for performing insert, delete and search operations

(b) hash table requires less space

(c) range query is easy with hash table

(d) easier to implement

I want to ask this question from Hash Tables in portion Hash Tables of Data Structures & Algorithms I

The question was posed to me in an online interview.

1 Answers

Right answer is (a) hash table has a better average time complexity for performing insert, delete and search operations

The best explanation: Hash table and BST both are examples of data structures. Hash table has an advantage that it has a better time complexity for performing insert, delete and search operations.