I came to know that Interpolation Search is a modification of Binary Search where in binary search the input is divided into two equal halves in each iteration by computing
mid = (low + high) / 2
and in Interpolation search the mid is computed as
mid = low + (key - arr[low]) * ((high - low) / (arr[high] - arr[low]))
Now I need to understand this formula of calculating mid
in interpolation search.
Ref: https://en.wikipedia.org/wiki/Interpolation_search#Sample_implementation