Skip to content

damdafayton/algorithms

Repository files navigation

Instructions for Towers of Hanoi algorithm

Calculates the steps based on given data for:

  • number of disks
  • start tower
  • target(goal) tower

Built With

  • JavaScript

Getting Started

  • Needs node.js to be installed
  • Open terminal
  • git clone https://github.com/damdafayton/towers-of-hanoi.git
  • cd towers-of-hanoi
  • Enter your own values:
    • 1st argument = disk number
    • 2nd argument = starting tower
    • 3rd argument = ending tower
    • node towers_of_hanoi.js 5 2 3
  • Or run with default values
    • node towers_of_hanoi.js
  • To log each steps vertically; enter your arguments followed by true
    • node towers_of_hanoi.js 5 2 3 true

Authors

👤 damdafayton

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

script: "various algorithms"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published