Interpolation Search
Interpolation Search Algorithm is an improvement of Binary Search. It works on the probing position of the required item. It works properly in sorted and equally distributed data lists.
Algorithm
To divide the list into two sub lists, we use
mid = Lo + ((Hi – Lo) / (A[Hi] – A[Lo])) * (X – A[Lo])
Where,
A = list
Lo = Lowest index of the list
Hi = Highest index of the list
A[n] = Value stored at index n in the list
Runtime complexity of interpolation search algorithm is Ο(log (log n)).
Last updated