Skip to content

tvladyslav/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Some algorithms implemented in rust for fun

Topics

Resources

License

Stars

Watchers

Forks