A repository with various sorting algorithms
```rs extern crate sort;
use sort::quick_sort;
fn main() { let mut listofnumbers = [4, 2, 7, 5, 1, 3]; quicksort(&mut listofnumbers); asserteq!(listofnumbers, [1, 2, 4, 5, 7]); } ```
```rs extern crate sort;
use sort::insertion_sort;
fn main() { let mut listofchars = ['s', 'y', 's', 't', 'e', 'm']; insertionsort(&mut listofchars) asserteq!(listofnumbers, ['e', 'm', 's', 's', 't', 'y']); } ```
sh
$ cargo run -- <bubble|selection|insertion|merge|quick> <comma-separated list of integers>
For example ```sh $ cargo run -- merge "12,54,33,27,19,23,44"
[12, 19, 23, 27, 33, 44, 54] ```
Make sure you have rust-toolchain installed to build the executable
For windows only
sh
$ ./release.sh
After you have built the executable, run the following
sh
$ ./build/sorter.exe <algorithm-option> <comma-separated list of integers>