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