What is the disadvantage of BST over the hash table?

Như Quỳnh

New member
What is the disadvantage of BST over the hash table?
A. BST is easier to implement
B. BST can get the keys sorted by just performing inorder traversal
C. BST can perform range query easily
D. Time complexity of hash table in inserting, searching and deleting is less than that of BST
 
Answer: d
Explanation: BST has an advantage that it is easier to implement, can get the keys sorted by just performing in-order traversal and can perform range query easily. Hash table has lesser time complexity for performing insert, delete and search operations.
 

Tìm kiếm

Back
Top