Algorithms implemented in Rust, explained.
This repository presents Rust implementations of common algorithms and data structures, many of which are based on William Fiset's Java implementation: https://github.com/williamfiset/Algorithms . I highly recommend his YouTube channel, where he explains many of these algorithms in detail using illustrations, animations and pseudocode. I recommend that you implement these algorithms by yourself before comparing them to my or William's implementations, since the best way to learn is by doing, and it's likely that you discover ways in which the code can be written in a more efficient, robust and/or readable way, in which case you're welcome to submit a PR!
I also write algorithms that's not yet available in William's repository. When I do so I attach references (most of which are freely accessible) that I used and hopefully they should be sufficient to guide you to write your own implementations.
The implementation details are explained in comments and docs and the example usage is implied in unit tests. To run tests:
I use LaTeX to write some math expression in docs. To render them correctly in docs, run:
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps --open
or an alias for this command:
This simple setup provides most features a decent IDE would provide (importantly, jump to definition and type labelling)