InterviewSolution
Saved Bookmarks
| 1. |
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 searchThis question was addressed to me in an interview.Question is taken from Searching topic in division Searching of Data Structures & Algorithms II |
|
Answer» RIGHT choice is (d) interpolation search Easy 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. |
|