Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stpfeffer/sorting-algorithms-python

Implementation of some sorting algorithms using Python
https://github.com/stpfeffer/sorting-algorithms-python

Last synced: 8 days ago
JSON representation

Implementation of some sorting algorithms using Python

Awesome Lists containing this project

README

        

# Sorting Algorithms using Python

## Explanation

**Sorting algorithm** is an algorithm that puts elements of a list into an order. The most frequently used orders are numerical order and lexicographical order, and either ascending or descending. Efficient sorting is important for optimizing the efficiency of other algorithms (such as search and merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for canonicalizing data and for producing human-readable output.

Formally, the output of any sorting algorithm must satisfy two conditions:

1. The output is in monotonic order (each element is no smaller/larger than the previous element, according to the required order).
2. The output is a permutation (a reordering, yet retaining all of the original elements) of the input.

## Sorting Algorithms

- [Bubble Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/bubblesort.py)
- [Gnome Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/gnomesort.py)
- [Heap Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/heapsort.py)
- [Insertion Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/insertionsort.py)
- [Merge Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/mergesort.py)
- [Quick Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/quicksort.py)
- [Selection Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/selectionsort.py)
- [Shell Sort](https://github.com/StPfeffer/sort-algorithms-python/blob/main/shellsort.py)

## Known Issues

- [Maximum recursion depth](https://github.com/StPfeffer/sort-algorithms-python/issues/1)

## Translations

- [**English**](https://github.com/StPfeffer/sort-algorithms-python)
- [Brazilian Portuguese](https://github.com/StPfeffer/sort-algorithms-python/blob/main/pt-br/README.md)