Skip to main content

Sophisticate Sorting Algorithms

Project description

vsort

PyPI version License: MIT

This library was created to simplify sorting algorithms by visually displaying them in the form of a horizontal table, using colors to illustrate the sorting steps, giving the ability to control the sorting speed and manually switching between items, all this is especially for beginners in sorting algorithms.

Installation

You can install vsort via pip:

pip install vsort

Usage

For selection sort algorithm

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29])
x.selection_sort()

Output

https://drive.google.com/file/d/1-uqA1tvz0QjtyAjhPJY_HarxoBKQZ9-o/view?usp=drive_link

For bubble sort algorithm

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29])
x.bubble_sort()

Output

https://drive.google.com/file/d/1KhYNYXrsGpH4noM20tJAKtgqJpoJ3HBV/view?usp=sharing

For insertion sort algorithm

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29])
x.insertion_sort()

Output

https://drive.google.com/file/d/1KHgl5-F4yepKj8H-VB2X-I1D3dReum1A/view?usp=drive_link

For shell sort algorithm

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29])
x.shell_sort()

Output

https://drive.google.com/file/d/1uTvzLAZi453u3Q8ywXl6vx7Zcjwxz7Cr/view?usp=drive_link

For heap sort algorithm

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29])
x.heap_sort()

Output

https://drive.google.com/file/d/1Gwv_zdUUHWG894W3NV_LSaN3xod638BY/view?usp=drive_link

You can sort in descending order

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29], reverse=True)

You can reduce the sorting speed

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29], speed=7)

You can control the sorting steps by pressing Enter

from vsort import sortVisualizer


x = sortVisualizer([70, 10, 7, 100, 96, 85, 83, 8, 87, 29], control=True)

License

This project is licensed under the MIT LICENSE - see the LICENSE for more details.

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

vsort-1.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

vsort-1.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file vsort-1.0.2.tar.gz.

File metadata

  • Download URL: vsort-1.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for vsort-1.0.2.tar.gz
Algorithm Hash digest
SHA256 252974cddd99547b54c04fef75fb7e6c8d639f8c8dd690ce5b71fc3e4b646933
MD5 495e71fd200d0b679316b356a7988bbc
BLAKE2b-256 583f48f9c0d6cf78ddfa67ea75a45cc9de37ca01966ca0b11857ac8fa108a360

See more details on using hashes here.

File details

Details for the file vsort-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: vsort-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for vsort-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d03811ebb32532628319bbbabdbd882c2d6a20db73af6e02790b2db28bfcacc
MD5 e6dc97e75bd95caca147781a6cbcb887
BLAKE2b-256 d6013eef0ee88b0a018c184154240ec363a3eea8da4825f0d3cb2f0940372735

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