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 hashes)

Uploaded Source

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