Algos
A rust library with a collection of algorithms.
Only sort algorithms for now. It is planned to add search and graph algorithms as well.
Usage
Add this to your Cargo.toml
:
[]
= "0.1"
and this to your crate root:
extern crate algos;
Sorts algorithms
Add this to your crate root:
use sort;
and create a array and use like this:
main
It can also work in an array of Strings, sorting by the length of the string:
Implemented
Sorts
- Selection Sort
- Bubble Sort
- Cocktail Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort