Loading practice questions
Which of the following searching algorithm is fastest when the input array is sorted but has non uniformly distributed values?
Correct Answer: C — binary search
Explanation:
Interpolation search has a time complexity of O(n) when the array does not have uniformly distributed values. So in such a case binary search has the least time complexity out of the given options.