Commit Graph

7 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
jbaenaxd
1f65007456
Shortened code (#3855) 2020-11-01 15:38:11 +08:00
percy07
df95f43907 Update quick_select.py (#1523)
* Update quick_select.py

Add Doctests.

* Add typehints

* Don't pre-allocate "smaller" and "larger"
2019-10-30 16:10:30 +01:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
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