Just some algorithms, implemented for fun. See unit tests to figure out how to use these functions.
- all_combinations Iterative and recursive way to get all possible combinations of slice elements. Benchmarks included.
- bellman_ford.rs Bellman-Ford algorithm searches minimal distances in graph that may contain negative weight edges
- kmp.rs Knuth-Morris-Pratt string-searching algorithm
- levenshtein.rs Levenshtein (edit) distance between 2 strings
- sh_sub.rs Find the shortest substring that contains all chars appeared in given string
- topological_sorting.rs Kahn's algorithm for topological sorting.
- twrqs.rs Three-way radix qsort with Dutch national flag splitting algorithm
# you need nightly toolchain to run benchmarks
cargo clippy
cargo test
cargo bench
See the LICENSE file for license rights and limitations (MIT).