Commit Graph

3 Commits

Author SHA1 Message Date
weixuanhu
b6c3fa8992 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
2019-05-18 10:59:12 +08:00
ParthS007
0856a61859 Remove Multiple Unused Imports and Variable 2018-10-18 02:58:57 +05:30
fickleEfrit
cb3ff4a8f8 Create quick_select.py 2017-10-09 17:26:27 -04:00