Which of the following is the most desirable condition for interpolation search?
array should be sorted
array should not be sorted but the values should be uniformly distributed
array should have a less than 64 elements
array should be sorted and the values should be uniformly distributed
Answer and explanation
Desirable condition for interpolation search is that the array should be sorted and the values should be uniformly distributed. The algorithm would fail to give the correct result if array is not sorted.
