EXAMPLE: To look up cat in a dictionary, you expect to find cat near the beginning.
INTERPOLATON SEARCH
i := 1
j := n
LO := ai
HI := aj
if x < LO then return 0
if x ≥ HI then i := j
loop invariant: x ≥ LO and x ≤ HI
while (i<j) do
m := [ i + (j-i)*(x-LO) / (HI-LO) ]
MID := am
if (x > MID) then
i := m+1
LO := MID
else
j := m
HI := MID
if (x ≠ ai) then i := 0
return i
EXAMPLE: 1,2,3,4,5,...,999,1000,109
Look for 1000