1.

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 implementI want to ask this question from Hash Tables in portion Hash Tables of Data Structures & Algorithms IThe question was posed to me in an online interview.

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions