Liking cljdoc? Tell your friends :D

tower-of-hanoi.core


(print-moves n from to aux)

Print all the moves for solving the puzzle. n is the total number of disks. from, to and aux are the names for the rods.

Print all the moves for solving the puzzle.
n is the total number of disks.
from, to and aux are the names for the rods.
sourceraw docstring

total-movesclj

(total-moves n)

Calculate the number of moves for the given number of disks. n is the total number of disks. Formula: (2 pow n) - 1

Calculate the number of moves for the given number of disks.
n is the total number of disks.
Formula: (2 pow n) - 1
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close