Implement a fast search for uniformly distributed sorted arrays using interpolation.
Constraints
Example
>>> interpolation_search([1, 2, 3, 4, 5], 3) 2 >>> interpolation_search([1, 2, 3, 4, 5], 4) 3 >>> interpolation_search([1, 2, 3, 4, 5], 6) -1 >>> interpolation_search([], 5) -1
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints