Thursday, May 14, 2015

Towers of Hanoi

Given a game board with four pegs and a set of disks of different diameter all stacked from smallest to largest on the leftmost peg, move all of the disks to the rightmost peg following these two rules. First, only one disk may be moved at a time. Second, a larger diameter disk may never be placed on a smaller disk.


Answer:




No comments:

Post a Comment