SAP Interview Question

Time complexity of Hash search and Binary search

Interview Answer

Anonymous

Jun 20, 2017

The Time complexity of binary search is O(Log n) and for Hash search, if the bucket is only one(worst case) the time complexity is O(n), as the number of buckets increases the time complexity of O(1) can be achieved.