Skip to main content

Sort implementation in Python

Project description

Sorting

Sort implementation in Python

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.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sorting-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 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.0.tar.gz
Algorithm Hash digest
SHA256 b5cac89816480b2fccbc0fe60740df2a8fb999c853acf22a5f3a74033b33802d
MD5 f79cd074e1f63ec1698c7307419e5693
BLAKE2b-256 50ccd002e990b3bec00d7ec9a6f106c73d2d6d1f6f0f1ee31f3f039cac8ded87

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