Various sorting algorithms in pure python
Project description
Normal sorting
Various sorting algorithms implemented in pure python. Now with typing support and for python 3.7/3.8.
Currently implemented following:
- Bubble (of course just for fun)
- Quick (with random pivot)
- Merge
- Insertion
- Heap
- More to go...
Compatibility
Python 3.7+ (test coverage include python 3.7, 3.8)
Usage
- Install
pip install sortpy
- Import sorting algorithm
from sortpy import quick
.
Function doesnt check the output (for the sake of speed), and have correct type annotations, that talk about available types. - Use it like
quick.sort([3, 2, 1])
Also
Test coverage with fixtures and random generated test cases (reference function is python basic timsort).
Has couple hundred parametrized tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sortpy-1.1.0.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file sortpy-1.1.0.tar.gz
.
File metadata
- Download URL: sortpy-1.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.8.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d03a7978787e07118a05a643c2d696702f6c46383d6bba06e32b8620395e0ed6 |
|
MD5 | 1ef5e871ea586d14123cb967f18ce2ea |
|
BLAKE2b-256 | b627d52f054b292bcbf5c40c0057c41b5bff7f8fe56e1ba261e8ebc4fa67f246 |
File details
Details for the file sortpy-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: sortpy-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.8.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af14821576d9932e53258928245015e214b092e593a297c7afa13cd18edef52 |
|
MD5 | 62de638e3a9a55b6a8c9918dd21c3590 |
|
BLAKE2b-256 | b7895b253cdd3e343c6fb8a38c5153d2cdf9fc0d6f8c73b92eed89514a554b6b |