* 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>
* added sleepsort
Adding sleepsort
* Add doctest and typing for sleepsort
* Use self-descriptive variable name
* Update sleepsort.py
* Update sorts/sleepsort.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* autoblack: actions/checkout@v1 # Use v1, NOT v2
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* spelling corrections
* review
* improved documentation, removed redundant variables, added testing
* added type hint
* camel case to snake case
* spelling fix
* review
* python --> Python # it is a brand name, not a snake
* explicit cast to int
* spaces in int list
* "!= None" to "is not None"
* Update comb_sort.py
* various spelling corrections in documentation & several variables naming conventions fix
* + char in file name
* import dependency - bug fix
Co-authored-by: John Law <johnlaw.po@gmail.com>
* improved prime numbers implementation
* fixup! Format Python code with psf/black push
* fix type hint
* fixup! Format Python code with psf/black push
* fix doctests
* updating DIRECTORY.md
* added prime tests with negative numbers
* using for instead filter
* updating DIRECTORY.md
* Remove unused typing.List
* Remove tab indentation
* print("Sorted order is:", " ".join(a))
* Update tim_sort.py
Update tim_sort.py
The previous algorithm was skipping numbers, according to issue #959, and my own tests.
The version I am applying uses a while loop, which works correctly and is easier to compute, as there is no break statement.
* Update tim_sort.py
* Added Whitespace and Docstring
I modified the file to make Pylint happier and make the code more readable.
* Beautified Code and Added Docstring
I modified the file to make Pylint happier and make the code more readable.
* Added DOCSTRINGS, Wikipedia link, and whitespace
I added DOCSTRINGS and whitespace to make the code more readable and understandable.
* Improved Formatting
* Wrapped comments
* Fixed spelling error for `movement` variable
* Added DOCSTRINGs
* Improved Formatting
* Corrected whitespace to improve readability.
* Added docstrings.
* Made comments fit inside an 80 column layout.
Use the last element as the first pivot, for it's easy to pop, this saves one element space.
Iterating with the original list saves half the space, instead of generate a new shallow copy list by slice method.
* -Added a single-threaded implementation of odd-even transposition sort.
This is a modified bubble sort meant to work with multiple processors.
Since this is running on a single thread, it has the same running time
as bubble sort.
* -Added a parallel implementation of Odd-Even Transposition sort
This implementation uses multiprocessing to perform the swaps
at each step of the algorithm simultaneously.
* Adding variable to fade out ambiguity
* More readability on merge sorting algorithm
* Updating merge_sort_fastest description and explaining why
* Adding tests file with imports
* Standardazing filenames and function names
* Adding test cases and test functions
* Adding test loop
* Putting 'user oriented code' inside main condition for having valid imports
* Fixing condition
* Updating tests: adding cases and todo list
* Refactoring first euler problem's first solution