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

https://github.com/chrismilson/sorting-visualiser

A visualisation tool for some well known sorting algorithms.
https://github.com/chrismilson/sorting-visualiser

sorted-data sorting-algorithm visualisation

Last synced: 18 days ago
JSON representation

A visualisation tool for some well known sorting algorithms.

Awesome Lists containing this project

README

          

# Sorting Visualiser

A simple visualisation tool for some well known sorting algorithms.

## Usage

When you load the page you will be presented with sorted data.

![initial state](readme-assets/initial.png "The first impression")

Pressing play here will perform the currently selected sort (heapsort by
default) on the already sorted data.

![heapsort on sorted data](readme-assets/heapsort-on-sorted.gif "Heapsort on sorted data")

The data can be modified/unsorted by using the unsorting algorithms (in pink)
made visible by opening the extended menu (the button marked ).

![the extra menu](readme-assets/extra-menu.png "The extra menu")

The current sorting algorithm can also be set in this menu by pressing the blue
buttons.

Try to modify the data in such a way that you get an idea for the algorithm. For
example, running timsort on reverse sorted data is very fast, but quicksort is
very slow!



timsort on reverse sorted data


quicksort on reverse sorted data


### Keyboard Shortcuts

There are some keyboard shortcuts for the experienced user:

| Key | Action |
|-|-|
| Space | Play / Pause |
| \**when playing*\* | Increase Animation Speed |
| \**when playing*\* | Decrease Animation Speed |
| \**when paused*\* | Next Move |
| \**when paused*\* | Previous Move |
| | Increase Data Size |
| | Decrease Data Size |
| r | Reset to initial unsorted state |
| ` | Reverse Animation Direction |
| Esc | Open / Close Extended Menu |
| s | Show / Hide Stats for Nerds |