Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/priyanshii1511/sorting-visualizer
This is a web application which visualizes the inner working of different sorting algorithms.
https://github.com/priyanshii1511/sorting-visualizer
Last synced: 5 days ago
JSON representation
This is a web application which visualizes the inner working of different sorting algorithms.
- Host: GitHub
- URL: https://github.com/priyanshii1511/sorting-visualizer
- Owner: Priyanshii1511
- Created: 2024-07-11T07:53:40.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T18:19:32.000Z (4 months ago)
- Last Synced: 2024-07-16T22:24:39.469Z (4 months ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Sorting refers to arranging the elements of an array or list in an ordered sequence.
# Sorting Visualizer
This application visualizes sorting algorithms with the help of colours which makes it easy to understand them.
The live app is here: https://priyanshii1511.github.io/Sorting-Visualizer/ The algorithms implemented are:
1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Merge Sort
5. Quick Sort
6. Heap Sort
Four colours have been used to showcase different steps being executed in the algorithm:
* BLUE: default
It represents the default array which has to be sorted or the original positions of the array elements.
* YELLOW: comparison
It represents the phase in which that array element is being compared.
* RED: incorrect
It represents the incorrect position of the element from which it has to be moved.
* GREEN: correct
It represents the correct and final position of an array element.
## Other features
* **Speed of Algorithm**
The speed of the algorithm can be altered. There are 5 speed levels (1 to 5) and by default it will be at 4.
* **Size of Array**
The size of the array can also be changed. If the size is small, then the width of the bars will be large.
* **Generate New Array**
New random array can be generated.
*When an algorithm starts, all these buttons are disabled so that it does not affect the implementation of the current algorithm.*
* **Time and Space Complexities**
The best, average and worst case time complexities as well as the space complexity of the algorithm running is displayed.
### Before Sorting:
![image1](https://github.com/Priyanshii1511/Sorting-Visualizer/assets/147601044/880f6dbc-eb46-4b79-a1c5-b4014c5ef726)
### After Sorting:
![image2](https://github.com/Priyanshii1511/Sorting-Visualizer/assets/147601044/e90c5cf6-d3b5-47a7-8f24-c51617cf92bc)