This is a different recursive implementation of the merge sort algorithm.
* Recursive Merge Sort That Accepts an Array
Recursive Merge Sort That Accepts an Array
* Add Wikipedia Link
* Fixes naming conventions
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Adds black format
* Removes unused variables
* Fixes variable names and adds documentation
* Fixes variable names to use snake_case.
* Removes double #.
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
Co-authored-by: Benjamin Fein <benfein78@icloud.com>
* [mypy] Add/fix type annotations for recursive_insertion_sort(#4085)
* [mypy] Add/fix type annotations for bucket_sort(#4085)
* [mypy] Reworked code for cocktail_shaker_sort so that missing return statement error is resolved(#4085)
* [mypy] Add/fix type annotations for patience_sort(#4085)
* [mypy] Add/fix type annotations for radix_sort(#4085)
Co-authored-by: goodm2 <4qjpngu8mem8cz>
* fixed shell sort
* udpate code style
* Update sorts/shell_sort.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Add Patience Sort
* fix code for pre-commit
* Fix params def
* Adding new line at end of file
* Remove Trailing Whitespace
* Adding space between the methods of the Stack class
* Removing Trailing Whitespace
* Ordering Imports
* Adding url patience sort
Co-authored-by: jvnascimento <nascimento783@gmail.com>
* Tighten up quicksort()
* updating DIRECTORY.md
* str does not support .pop()
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix all errors mentioned in pre-commit run:
- Fix end of file
- Remove trailing whitespace
- Fix files with black
- Fix imports with isort
* Fix errors
* Update sorts/quick_sort_3partition.py
Another quick sort algorithm, returns a new sorted list
* Update sorts/quick_sort_3_partition.py
rename quick_sort_3partition to quick_sort_3part
* Update sorts/quick_sort_3_partition.py
rename quick_sort_3part to three_way_radix_quicksort
Three-way radix quicksort:
https://en.wikipedia.org/wiki/Quicksort#Three-way_radix_quicksort
First divide the list into three parts.
Then recursively sort the "less than" and "greater than" partitions.
* Update sorts/quick_sort_3_partition.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Delete sleep_sort.py
A silly algorithm designed to waste time. #2350 demonstrates that it is a 20+ second denial of service attack on every Travis CI run that we do.
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* 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>
* Added bead sort
* Commit suggestion
* Added checking before sort
* Bead sort only works for sequences of nonegative integers
Co-authored-by: Christian Clauss <cclauss@me.com>
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added more flexibility to functions, decreased amount of repeating code
* Added docstrings
* Updated input functions
* Added doctests
* removed test piece of code
* black .
* Updated caesar cipher standard alphabet to fit python 3.8
* Update and rename sleepsort.py to sleep_sort.py
* Or 4
Co-authored-by: Christian Clauss <cclauss@me.com>