Python/sorts
pre-commit-ci[bot] 716bdeb68b
[pre-commit.ci] pre-commit autoupdate (#11473)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1)

* Fix ruff issues

* Fix ruff issues

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-07-02 07:02:29 +02:00
..
__init__.py Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
bead_sort.py Enable ruff RUF007 rule (#11349) 2024-04-20 16:20:27 +02:00
binary_insertion_sort.py Code enhancements in binary_insertion_sort.py (#10918) 2023-10-24 23:51:04 +02:00
bitonic_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
bogo_sort.py Update bogo_sort.py (#8144) 2023-02-20 11:14:01 +13:00
bubble_sort.py Consolidate bubble sort iterative and recursive (#10651) 2023-10-19 22:45:51 +02:00
bucket_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
circle_sort.py Make some ruff fixes (#8154) 2023-03-01 17:23:33 +01:00
cocktail_shaker_sort.py Update cocktail_shaker_sort.py (#10987) 2023-10-26 14:27:31 +02:00
comb_sort.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
counting_sort.py [pre-commit.ci] pre-commit autoupdate (#9013) 2023-08-29 15:18:10 +02:00
cycle_sort.py [pre-commit.ci] pre-commit autoupdate (#9013) 2023-08-29 15:18:10 +02:00
double_sort.py code enhancement in sort.double_sort (#10798) 2023-10-23 09:51:27 +02:00
dutch_national_flag_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
exchange_sort.py Create exchange_sort.py (#4600) 2021-08-15 07:43:05 +02:00
external_sort.py [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
gnome_sort.py Gnome sort : type hints, docstrings, doctests (#2307) 2020-08-14 22:00:08 +02:00
heap_sort.py contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
insertion_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
intro_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
iterative_merge_sort.py Fix iter_merge_sort bug (#6153) 2022-05-21 22:02:53 +08:00
merge_insertion_sort.py Reduce the complexity of sorts/merge_insertion_sort.py (#7954) 2022-12-24 15:57:28 +01:00
merge_sort.py Code Enhancements in merge_sort.py (#10911) 2023-10-25 17:26:54 -04:00
msd_radix_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
natural_sort.py Create natural_sort.py (#3286) 2020-10-15 13:45:17 +02:00
normal_distribution_quick_sort.md Remove useless code in doctests (#7733) 2022-10-27 22:52:00 +02:00
odd_even_sort.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
odd_even_transposition_parallel.py Use spawn start method in multiprocessing programs (#11391) 2024-05-02 18:43:59 +02:00
odd_even_transposition_single_threaded.py Fix word typos in comments (#4928) 2021-10-04 12:07:58 +08:00
pancake_sort.py contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
patience_sort.py fix: comment in patience sort (#4972) 2021-10-04 11:33:42 +08:00
pigeon_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
pigeonhole_sort.py Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
quick_sort_3_partition.py Quick sort with lomuto partition (#3875) 2021-02-17 15:28:50 +01:00
quick_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
radix_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
README.md Fix typos (#9076) 2023-09-23 10:53:09 +02:00
recursive_insertion_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
recursive_mergesort_array.py fix: use += in sorts/recursive_mergesort_array.py (#5019) 2021-10-27 00:43:46 +08:00
recursive_quick_sort.py Make some ruff fixes (#8154) 2023-03-01 17:23:33 +01:00
selection_sort.py Updated Selection Sort (#10855) 2023-10-23 14:12:28 -04:00
shell_sort.py Add typing (#9652) 2023-10-03 22:06:52 -04:00
shrink_shell_sort.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
slowsort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
stooge_sort.py Add typing (#9651) 2023-10-03 22:05:47 -04:00
strand_sort.py fix: no implicit optional (#7984) 2022-11-15 14:55:14 +01:00
tim_sort.py Make some ruff fixes (#8154) 2023-03-01 17:23:33 +01:00
topological_sort.py Add typing to topological_sort.py (#9650) 2023-10-03 21:47:03 -04:00
tree_sort.py [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
unknown_sort.py Set the Python file maximum line length to 88 characters (#2122) 2020-06-16 10:09:19 +02:00
wiggle_sort.py Wiggle sort (#2419) 2020-09-25 09:18:00 +02:00

Sorting Algorithms

Sorting is the process of putting data in a specific order. The way to arrange data in a specific order is specified by the sorting algorithm. The most typical orders are lexical or numerical. The significance of sorting lies in the fact that, if data is stored in a sorted manner, data searching can be highly optimised. Another use for sorting is to represent data in a more readable manner.

This section contains a lot of important algorithms that help us to use sorting algorithms in various scenarios.

References