Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bd2720/sortvisualizer
A simple sorting algorithm visualization tool. Uses Processing for Java.
https://github.com/bd2720/sortvisualizer
algorithms java processing sorting-algorithms visualization
Last synced: about 1 month ago
JSON representation
A simple sorting algorithm visualization tool. Uses Processing for Java.
- Host: GitHub
- URL: https://github.com/bd2720/sortvisualizer
- Owner: bd2720
- Created: 2024-07-12T17:45:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T05:41:42.000Z (5 months ago)
- Last Synced: 2024-07-26T03:24:54.333Z (5 months ago)
- Topics: algorithms, java, processing, sorting-algorithms, visualization
- Language: Processing
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SortVisualizer
SortVisualizer is a simple visualization tool for sorting algorithms.
## About
Sorts a shuffled array of integers using a specified sorting algorithm.
The x-position of each segment represents an index, and the segment's height is proportional to the array's current value at that index.
The comparison (if present) made on each frame is highlighted in red.
If a comparison on a given frame results in any swaps, they will display on the following frame.
Number of swaps and number of comparisons are displayed as the animation plays.
Press the spacebar to pause/unpause.
## Options
``sortingAlg`` - SortType value representing the sorting algorithm to be performed on the array.
``arrSize`` - size of array to sort, containing numbers from 0 to size-1 at random locations.
``fps`` - frames per second, where a frame is (generally) one iteration of the sorting algorithm's inner loop.
``size(, )`` - width and height of the window in pixels. (first line of ``setup()``)## Sorting Algorithms
```
enum SortType {
BUBBLE, // bubble sort
SELECTION, // selection sort
INSERTION, // insertion sort
QUICK, // quicksort
HEAP, // heapsort
BOGO // bogosort
}
```