SIGN IN SIGN UP
TheAlgorithms / Python UNCLAIMED

All Algorithms implemented in Python

0 0 1 Python

Interpolation search - fix endless loop bug, divide 0 bug and update description (#793)

* fix endless loop bug, divide 0 bug and update description

fix an endless bug, for example, if collection = [10,30,40,45,50,66,77,93], item = 67.

fix divide 0 bug,  when right=left it is not OK to point = left + ((item - sorted_collection[left]) * (right - left)) // (sorted_collection[right] - sorted_collection[left])

update 'sorted' to 'ascending sorted' in description to avoid confusion

* delete swap files

* delete 'address' and add input validation
W
weixuanhu committed
b6c3fa8992e1f3430e623b6c4b1268c89e26f71f
Parent: f3608ac
Committed by John Law <[email protected]> on 5/18/2019, 2:59:12 AM