Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.59 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.59 KB

algorithms

Build Status Rust CI license

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

How to run

# you need nightly toolchain to run benchmarks
cargo clippy
cargo test
cargo bench

License

See the LICENSE file for license rights and limitations (MIT).

Test and benchmark data

United States Code annual historical archives