A Rust program for visualizing sorting algorithms which uses Piston for graphics. Inspired by Hopson97/Sort-Algorithm-Visualiser.
git clone https://github.com/dmitmel/sorting-visualization
cd sorting-visualization
cargo build --release
# see 'Features' section for the list of supported algorithms and their IDs
# and use the --help flag to print all available animation options
cargo run <algorithm>
# list all available algorithms
cargo run -- --list
- CLI
- Supports different algorithms (IDs are in brackets):
- Bubble sort [
bubble
] - Cocktail sort [
cocktail
] - Cycle sort [
cycle
] - Gnome sort [
gnome
] - Heap sort [
heap
] - Insertion sort [
insertion
] - Merge sort [
merge
] - Quicksort [
quicksort
] - Selection sort [
selection
] - Shellsort [
shellsort
]
- Bubble sort [
- Animation controls:
- Space - pause/resume
- ↑ - 2x faster
- ↓ - 2x slower
- Easy-to-use algorithm API
- Algorithms can highlight important array elements
- Code is well-documented
./docs.sh
Nightly Rust is required for building docs because it has infra doc link resolution which is currently unstable.
- User-friendly GUI
- More algorithms
- Sound?
PRs are appreciated!