1.

Which of the following is the most desirable condition for interpolation search?(a) array should be sorted(b) array should not be sorted but the values should be uniformly distributed(c) array should have a less than 64 elements(d) array should be sorted and the values should be uniformly distributedThe question was asked in semester exam.My question comes from Searching in division Searching of Data Structures & Algorithms II

Answer»

Right answer is (d) ARRAY should be sorted and the VALUES should be uniformly distributed

The BEST I can explain: 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.



Discussion

No Comment Found

Related InterviewSolutions