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.bubble(data)
print('Bubble Sort      : ', res)

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

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

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

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

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

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

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

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

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

res = sorting.cycle(data)
print('Cycle 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]
Cycle Sort       :  [1, 2, 3, 4, 5, 6, 8, 9]
"""

License

MIT Yoginth

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

Uploaded Source

File details

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

File metadata

  • Download URL: sorting-1.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for sorting-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a2038aae5d64add813d0467681d9fb4b74e04e6435683ee2b588f433b47421e0
MD5 97d749bde21d3e53d35bfcc237022048
BLAKE2b-256 5aa797e31ce3b9c16f1041bb94063a2778b666ef8ee5862094c248e9445c454c

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