Skip to main content

Sort implementation in Python

Project description

Sorting

Sort implementation in Python

Demo

Demo on Repl.it

Install

$ pip install sorting

Usage

import sorting

data = [1, 8, 3, 5, 6, 9, 2, 4]

res = sorting.bubblesort(data)
print('Bubble Sort      : ', res)

res = sorting.bucketsort(data)
print('Bucket Sort      : ', res)

res = sorting.combsort(data)
print('Comb Sort        : ', res)

res = sorting.countingsort(data)
print('Counting Sort    : ', res)

res = sorting.maxheapsort(data)
print('Max Heap Sort    : ', res)

res = sorting.minheapsort(data)
print('Min Heap Sort    : ', res)

res = sorting.mergesort(data)
print('Merge Sort       : ', res)

res = sorting.quicksort(data)
print('Quick Sort       : ', res)

res = sorting.radixsort(data)
print('Radix Sort       : ', res)

res = sorting.selectionsort(data)
print('Selection Sort   : ', res)

"""
Output:
Bubble Sort      :  [1, 2, 3, 4, 5, 6, 8, 9]
Bucket Sort      :  [1, 2, 3, 4, 5, 6, 8, 9]
Comb Sort        :  [1, 2, 3, 4, 5, 6, 8, 9]
Counting Sort    :  [1, 2, 3, 4, 5, 6, 8, 9]
Max Heap Sort    :  [1, 2, 3, 4, 5, 6, 8, 9]
Min Heap Sort    :  [1, 2, 3, 4, 5, 6, 8, 9]
Merge Sort       :  [1, 2, 3, 4, 5, 6, 8, 9]
Quick Sort       :  [1, 2, 3, 4, 5, 6, 8, 9]
Radix Sort       :  [1, 2, 3, 4, 5, 6, 8, 9]
Selection Sort   :  [1, 2, 3, 4, 5, 6, 8, 9]
"""

Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.

  2. For bug reports and feature requests, open issues.

  3. For direct and quick help, you can email me.

How to contribute

Have an idea? Found a bug? See how to contribute.

Thanks!

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sorting-1.0.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file sorting-1.0.1.tar.gz.

File metadata

  • Download URL: sorting-1.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.0

File hashes

Hashes for sorting-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1407a658b1ebd4e2cda44bd2715f6ff323ec4180f9ed0f091353403a9a085fee
MD5 5e9797f3ea66b4247ed0ba37f72f3e9b
BLAKE2b-256 ea125837f667f608ac5c10313128f836dea16b3b8b810d59f1e132f7a891589e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page