Skip to main content

A simple quicksort implementation

Project description

QuickSortPy

QuickSortPy (by RapidDragon2612) is a Python implementation of the Quick Sort algorithm.

Quick Sort is widely regarded as one of the fastest and most efficient general-purpose sorting algorithms.


Installation

Install QuickSortPy using pip:

pip install quicksortpy

Usage

Import the library in your Python file:

import quicksortpy

Sort an array (in-place)

quicksortpy.sort(example_array)

This will sort example_array in place.


Sort into a new array

sorted_arr = quicksortpy.sort(example_array, True)

This returns a new sorted array without modifying the original.


Visualization

For educational purposes, you can visualize how the Quick Sort algorithm works step by step:

quicksortpy.visualize(example_array)

or:

quicksortpy.visualise(example_array)

This will display each step the algorithm takes while sorting the array.


Notes

  • The sort() function accepts:
    • array: The list to sort
    • new_arr (optional): Set to True to return a new sorted list instead of modifying the original

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

quicksortpy-1.0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

quicksortpy-1.0.2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quicksortpy-1.0.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for quicksortpy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 57e4a9471e118c456659a3429a6d88067568a348edd8dfa642492dbb8ea9c1a1
MD5 2573f16ab53c806f23492f32a45b200e
BLAKE2b-256 75e6ef872bacd85c6c211b22431371b62304faf761af207864bc0d20c913bc1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quicksortpy-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for quicksortpy-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c25bfa8782ad27c9f78fdb9aab65a56a05fcf018e78a8f1e8aceb12b7c65b057
MD5 c8639e73ce025bf20a9711ff4fc3e314
BLAKE2b-256 18ca020e14cff9ccca1e4812209a2531a98233160298a1e71df0a94213c02f82

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