⛩️ An implementation of the Tower of Hanoi. Written in Rust.
This implementation takes about 13 ns
to perform a move. The algorithm for calculating required moves is:
(2 ^ n - 1)
where n
is the amount of rings.
That means it will take approximately ~55.86
seconds to complete the puzzle with 32
rings.
git clone https://github.com/ajmwagar/hanoi
cd hanoi
cargo install --path ./
hanoi --help
: Opens a help menuhanoi 8
: Solves the puzzle with 8 ringshanoi 8 -v
: Solves the puzzle while printing out each step
cargo test
: to run testscargo bench
: run benchmarks