Skip to content
/ hanoi Public

⛩️ An implementation of the Tower of Hanoi. Written in Rust.

Notifications You must be signed in to change notification settings

ajmwagar/hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hanoi

⛩️ An implementation of the Tower of Hanoi. Written in Rust.

Tower of Hanoi

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.

Installation

git clone https://github.com/ajmwagar/hanoi
cd hanoi
cargo install --path ./

Usage

  • hanoi --help: Opens a help menu
  • hanoi 8: Solves the puzzle with 8 rings
  • hanoi 8 -v: Solves the puzzle while printing out each step

Tests & Benchmarks

  • cargo test: to run tests
  • cargo bench: run benchmarks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy