Skip to main content

This package will help user to get the results of few sorting algorithms.

Project description

SortingAlgorithms

A sorting algorithm is an algorithm that places the list elements in a certain order. Efficient sorting is critical for maximizing the performance of other algorithms that enable input data to be stored in sorted lists.

This package will help user to get the results of few sorting algorithms(will be updated in future).

Installation

pip install SortingAlgorithms

How to use it?

First, use the above command to install the package. The package includes a few algorithms that can be used either to understand the working condition or to complete the goal by using a sorting algorithm.

Below is a brief example of how the package will be used to accomplish the goal.

from SortingAlgorithms import Algorithms as algo

data = [22, 5, 34, 12, 90, 33] 

print(algo.bubbleSort(array= data, ascending= True, steps= True))

Output:-

step 1:-
j = 0 : [22, 5, 34, 12, 90, 33] 
Swapping: 5 with 22
j = 1 : [5, 22, 34, 12, 90, 33] 
j = 2 : [5, 22, 34, 12, 90, 33] 
Swapping: 12 with 34
j = 3 : [5, 22, 12, 34, 90, 33] 
j = 4 : [5, 22, 12, 34, 90, 33]
Swapping: 33 with 90


step 2:-
j = 0 : [5, 22, 12, 34, 33, 90]
j = 1 : [5, 22, 12, 34, 33, 90]
Swapping: 12 with 22
j = 2 : [5, 12, 22, 34, 33, 90]
j = 3 : [5, 12, 22, 34, 33, 90]
Swapping: 33 with 34


step 3:-
j = 0 : [5, 12, 22, 33, 34, 90]
j = 1 : [5, 12, 22, 33, 34, 90]
j = 2 : [5, 12, 22, 33, 34, 90]


step 4:-
j = 0 : [5, 12, 22, 33, 34, 90]
j = 1 : [5, 12, 22, 33, 34, 90]

step 5:-
j = 0 : [5, 12, 22, 33, 34, 90]


step 6:-


[5, 12, 22, 33, 34, 90]

The parameters which user can use while calling the functions are:

  • array - The array of number is given as input.
  • ascending - The order in which the array needs to sorted. Bydefault it is False i.e descending.
  • steps - If working of sorting is need to be scene steps can be used. Bydefault it is False.

Algorithms which are available in package:

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort

Version Update details

  1. version 1.0 - 04/02/2021

License

© 2021 Abhishek Tripathi

This repository is licensed under the MIT license. See LICENSE for details.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

SortingAlgorithms-1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SortingAlgorithms-1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file SortingAlgorithms-1.0.tar.gz.

File metadata

  • Download URL: SortingAlgorithms-1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for SortingAlgorithms-1.0.tar.gz
Algorithm Hash digest
SHA256 bcc1b331e2af386809936686751029acb7f069c0cea09bd055dc5bb659cbea57
MD5 e255812b92943e720319c26f09f0d510
BLAKE2b-256 d76a7d1908fc04045a074e770acbe73c88028404fcf326aeabbbdae27429c874

See more details on using hashes here.

File details

Details for the file SortingAlgorithms-1.0-py3-none-any.whl.

File metadata

  • Download URL: SortingAlgorithms-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for SortingAlgorithms-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30e8557e969baf9bd8b9be2d316eda33b9fbcbdb6317576fb601141a4cd5128b
MD5 b3f8943c6186eba5507893f9de26a498
BLAKE2b-256 d95630a8774247e84680634f14783931669efbb3e360dc95dc8894c602200639

See more details on using hashes here.

Supported by

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