Skip to main content

A simple sorting algorithms education package

Project description

sortByTanvir

sortByTanvir is a Python package that provides various sorting algorithms for educational purposes. It includes the following sorting algorithms:

  • Bubble Sort
  • Counting Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Radix Sort
  • Selection Sort

Table of Contents

Installation

You can install sortByTanvir via pip:

pip install sortByTanvir

Usage

Here's an example of how to use the bubble sort algorithm:

from sortByTanvir import bubble_sort

arr = [12, 11, 13, 5, 6, 7]
bubble_sort(arr)
print(arr)  # sorted array

Here's an example of how to use the Counting sort algorithm:

from sortByTanvir import Counting_sort

arr = [12, 11, 13, 5, 6, 7]
Counting_sort(arr)
print(arr)  # sorted array

Sorting Algorithms

Here's a brief description of each sorting algorithm:

  • Bubble Sort: A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
  • Counting Sort: A sorting algorithm that sorts a collection of objects according to the count of a particular key value.
  • Insertion Sort: A simple sorting algorithm that builds the final sorted array one item at a time.
  • Merge Sort: An external algorithm based on divide and conquer strategy.
  • Quick Sort: A divide and conquer algorithm.
  • Radix Sort: A sorting algorithm that sorts data with integer keys by grouping keys by the individual digits that share the same significant position and value.
  • Selection Sort: A simple sorting algorithm that sorts an array by repeatedly finding the minimum element from unsorted part and putting it at the beginning.

Contributing

We welcome contributions from the community. Please submit a pull request if you have any improvements or new features to add.

License

sortByTanvir is released under the MIT License.

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

sortByTanvir-1.0.3.tar.gz (4.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sortByTanvir-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for sortByTanvir-1.0.3.tar.gz
Algorithm Hash digest
SHA256 fb1fb6577faa87995ff580eb0442bbd4ae86a8689faf483aad8607a60b40cc57
MD5 9d6390a94998aabec31c80f9faad090e
BLAKE2b-256 409e45540dea6a7725d3e5cce01beb4745eac4e0c09d8c37a20dd7cb96321325

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