An interpolation search assumes that the data in an array is sorted and uniformly distributed. Whereas a binary search always looks at the middle item in an array, an interpolation search looks where the sought-for item is more likely to occur. For example, if you searched for Victoria Appleseed in a sorted directory of names, you probably would look near its beginning rather than its middle. And if you discovered many Appleseed’s, you would look near the last Appleseed for Victoria. Instead of looking at the element a[mid] of an array a, as the binary search would, an interpolation search examines a[index], were
Implement an interpolation search of an array. For particular arrays, compare the outcomes of an interpolation search and of a binary search. Consider arrays that have uniformly distributed entries and arrays that do not.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here