Commit Graph

4 Commits

Author SHA1 Message Date
Maxim Smolskiy
79ef431cec
Reduce the complexity of sorts/merge_insertion_sort.py (#7954)
* Reduce the complexity of sorts/merge_insertion_sort.py

* Add tests

* Lower the --max-complexity threshold in the file .flake8
2022-12-24 15:57:28 +01:00
yellowsto
6680e435a7
Update merge_insertion_sort.py (#5833)
* Update merge_insertion_sort.py

Fixes #5774

merge_insertion_sort

Co-Authored-By: AilisOsswald <44617437+AilisOsswald@users.noreply.github.com>

* Update merge_insertion_sort.py

Fixes #5774

merge_insertion_sort

Co-Authored-By: AilisOsswald <44617437+AilisOsswald@users.noreply.github.com>

* Update merge_insertion_sort.py

Fixes #5774

added permutation range from 0 to 4

Co-Authored-By: AilisOsswald <44617437+AilisOsswald@users.noreply.github.com>

* Use `all()`

Co-authored-by: AilisOsswald <44617437+AilisOsswald@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
2021-12-16 17:27:15 +08:00
Christian Clauss
9200a2e543
from __future__ import annotations (#2464)
* from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
ryuta69
9ec71cbdda
Add merge insertion sort (#2211)
* Add merge insertion sort

* Fix python naming conventions

* Add wikipedia link

* Add type hint

* Fix python to python3

Co-authored-by: Christian Clauss <cclauss@me.com>

* Refactor doubled process in if-condition into one outside of if-condition

Co-authored-by: Christian Clauss <cclauss@me.com>

* Refactor make python3 prior to python

Co-authored-by: Christian Clauss <cclauss@me.com>

* Fix name of is_surplus into has_last_odd_item

* Add comment

* Fix long comment to shorten

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-20 22:42:08 +05:30