Python/sorts
Tan Kai Qun, Jeremy 8c23cc5117
Add typing ()
Co-authored-by: Jeremy Tan <jeremytan@stripe.com>
2023-10-03 22:07:25 -04:00
..
__init__.py Add __init__.py files in all the directories () 2020-09-28 19:42:36 +02:00
bead_sort.py refactor: Indent ... for visual purposes () 2022-10-27 19:42:30 +02:00
binary_insertion_sort.py Working binary insertion sort in Python () 2023-05-11 06:50:32 +12:00
bitonic_sort.py Remove useless code in doctests () 2022-10-27 22:52:00 +02:00
bogo_sort.py Update bogo_sort.py () 2023-02-20 11:14:01 +13:00
bubble_sort.py Update sorts/bubble_sort.py () 2023-07-31 11:50:00 -07:00
bucket_sort.py Fix sorts/bucket_sort.py implementation () 2023-08-17 18:38:19 -07:00
circle_sort.py Make some ruff fixes () 2023-03-01 17:23:33 +01:00
cocktail_shaker_sort.py [mypy]Correction of all errors in the sorts directory () 2021-02-23 10:02:30 +01:00
comb_sort.py pre-commit: Upgrade psf/black for stable style 2023 () 2023-02-01 18:44:54 +05:30
counting_sort.py [pre-commit.ci] pre-commit autoupdate () 2023-08-29 15:18:10 +02:00
cycle_sort.py [pre-commit.ci] pre-commit autoupdate () 2023-08-29 15:18:10 +02:00
double_sort.py [pre-commit.ci] pre-commit autoupdate () 2023-08-29 15:18:10 +02:00
dutch_national_flag_sort.py Add more ruff rules () 2023-05-26 09:34:17 +02:00
exchange_sort.py Create exchange_sort.py () 2021-08-15 07:43:05 +02:00
external_sort.py Replace bandit, flake8, isort, and pyupgrade with ruff () 2023-03-15 13:58:25 +01:00
gnome_sort.py Gnome sort : type hints, docstrings, doctests () 2020-08-14 22:00:08 +02:00
heap_sort.py contribution guidelines checks () 2020-03-04 13:40:28 +01:00
insertion_sort.py fixes ; improve insertion_sort algorithm () 2023-08-21 16:17:02 -07:00
intro_sort.py Create intro_sort.py () 2020-11-25 09:54:31 +01:00
iterative_merge_sort.py Fix iter_merge_sort bug () 2022-05-21 22:02:53 +08:00
merge_insertion_sort.py Reduce the complexity of sorts/merge_insertion_sort.py () 2022-12-24 15:57:28 +01:00
merge_sort.py Format docs () 2022-10-29 08:26:19 +02:00
msd_radix_sort.py Make some ruff fixes () 2023-03-01 17:23:33 +01:00
natural_sort.py Create natural_sort.py () 2020-10-15 13:45:17 +02:00
normal_distribution_quick_sort.md Remove useless code in doctests () 2022-10-27 22:52:00 +02:00
odd_even_sort.py pre-commit: Upgrade psf/black for stable style 2023 () 2023-02-01 18:44:54 +05:30
odd_even_transposition_parallel.py [pre-commit.ci] pre-commit autoupdate () 2023-08-29 15:18:10 +02:00
odd_even_transposition_single_threaded.py Fix word typos in comments () 2021-10-04 12:07:58 +08:00
pancake_sort.py contribution guidelines checks () 2020-03-04 13:40:28 +01:00
patience_sort.py fix: comment in patience sort () 2021-10-04 11:33:42 +08:00
pigeon_sort.py Pyupgrade to Python 3.9 () 2021-09-07 13:37:03 +02:00
pigeonhole_sort.py Create codespell.yml () 2020-01-18 13:24:33 +01:00
quick_sort_3_partition.py Quick sort with lomuto partition () 2021-02-17 15:28:50 +01:00
quick_sort.py Make some ruff fixes () 2023-03-01 17:23:33 +01:00
radix_sort.py refactor: Move constants outside of variable scope () 2022-10-16 15:03:29 +05:30
README.md Fix typos () 2023-09-23 10:53:09 +02:00
recursive_bubble_sort.py Optimized recursive_bubble_sort () 2020-09-10 10:31:26 +02:00
recursive_insertion_sort.py Remove useless code in doctests () 2022-10-27 22:52:00 +02:00
recursive_mergesort_array.py fix: use += in sorts/recursive_mergesort_array.py () 2021-10-27 00:43:46 +08:00
recursive_quick_sort.py Make some ruff fixes () 2023-03-01 17:23:33 +01:00
selection_sort.py Add typing () 2023-10-03 22:07:25 -04:00
shell_sort.py Add typing () 2023-10-03 22:06:52 -04:00
shrink_shell_sort.py pre-commit: Upgrade psf/black for stable style 2023 () 2023-02-01 18:44:54 +05:30
slowsort.py Pyupgrade to Python 3.9 () 2021-09-07 13:37:03 +02:00
stooge_sort.py Add typing () 2023-10-03 22:05:47 -04:00
strand_sort.py fix: no implicit optional () 2022-11-15 14:55:14 +01:00
tim_sort.py Make some ruff fixes () 2023-03-01 17:23:33 +01:00
topological_sort.py Add typing to topological_sort.py () 2023-10-03 21:47:03 -04:00
tree_sort.py Add pep8-naming to pre-commit hooks and fixes incorrect naming conventions () 2022-10-13 00:54:20 +02:00
unknown_sort.py Set the Python file maximum line length to 88 characters () 2020-06-16 10:09:19 +02:00
wiggle_sort.py Wiggle sort () 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