Which of the following searching algorithm is fastest when the input array is sorted and has uniformly distributed values?

Phạm Quyết

New member
Which of the following searching algorithm is fastest when the input array is sorted and has uniformly distributed values?
A. jump search
B. exponential search
C. binary search
D. interpolation search
 
Answer: d
Explanation: Interpolation search has a time complexity of O( log log n) when the array is sorted and has uniformly distributed values. It has the least time complexity out of the given options for such a case.
 

Tìm kiếm

Back
Top