0 7

Data Structures and Algorithms05 marksHashing versus binary search comparison

Is hashing better than binary search algorithm? Give reasons. Define any two collision resolution techniques.

Is hashing better than binary search algorithm? Give reasons. Define any two collision resolution techniques. [5]

It depends on the use case, but in many scenarios hashing is considered better than binary search. Here is a comparison: Criteria Hashing Binary Search --------- Time Complexity (Average) O(1) O(log n) Time Complexity (Worst) O(n) O(log n) Data Requirement Unsorted data is fine Data must be sorte...

Up nextWhat is a Binary Search Tree? Write an algorithm for searching an item in a binary search