Loading practice questions
Which of the following searching algorithm is fastest when the input array is not sorted but has uniformly distributed values?
Correct Answer: B — linear search
Explanation:
Out of the given options linear search is the only searching algorithm which can be applied to arrays which are not sorted. It has a time complexity of O(n) in the worst case.