Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ilanzs/SortingAlgorithmVisualization

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SortingAlgorithmVisualization

A place for me to learn about sorting algorithms.

Getting started

  1. Install python on your machine.
  2. Install pygame by running this command: pip install pygame.
  3. Navigate to the folder at which main.py is located.
  4. In your terminal run python main.py <sortingAlgorithm>

How to navigate the GUI

To increase the number of elements in the array press the .
To decrease the number of elements in the array press the .
To increase the sorting speed press the .
to decrease the sorting speed press the .

Implemented sorting algorithms

Counting Sort is a good algorithm for lists with small positive integer
Speed: O(n+k)
n is number of elements in the array. k is range of possible numbers in the array.

Bubble Sort a simple inefficient sorting algorithms. Works with any float or integer
Speed: Speed: O(n²)
n is number of elements in the array.

Quick Sort is a divide and conquer sorting algorithm.
Speed: O(n log n)
n is number of elements in the array.

Merge Sort is a divide and conquer sorting algorithm.
Speed: O(n log n)
n is number of elements in the array.

Comb Sort is an imporvement on Bubble Sort.
Speed: O(n² / 2p)
n is number of elements in the array.
p is number of increments.

Shell Sort is an in place compirason sort.
Speed: Worst: O(n²)
Best: O(n log n)
n is number of elements in the array.

Selection Sort is an in place comparison sorting algorithms.
Speed: O(n²)
n is number of elements in the array

Cocktail Sort is a variation of Bubble sort.
Speed: O(n²)
n is number of elements in the array

Gnome Sort (dubbed stupid sort) is a sorting algorithm originally proposed by Iranian computer scientist Hamid Sarbazi-Azad.
Speed: O(n²)
n is number of elements in the array

Stooge Sort is very slow recusrive sorting algorithm. Speed: O(n2.709) n is number of elements in the array

Bogo Sort is made as a joke. It works by shuffling the list until it is sorted.
Speed: O((n + 1)!)
n is number of elements in the array.

About

A sorting algorithm visualizer made in python.

Topics

Resources

License

Stars

Watchers

Forks

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.