1. The Tower of Hanoi (a) Compile and run the JSS implementation (on page 598 - 600) of the Tower of Hanoi. You should have three pegs (from left to right peg0, peg1, and peg2). Disks however are (from the smallest to the largest) disk1, disk2, ..., diskn. All the desks are stacked on peg0 initially. It is asked to move all disks from peg0 to peg2. The output for the program with 3 disks is:
Move one disk from 0 to 2 Move one disk from 0 to 1 Move one disk from 2 to 1 Move one disk from 0 to 2 Move one disk from 1 to 0 Move one disk from 1 to 2 Move one disk from 0 to 2
(b) Revise your implementation to include stepwise states of the tower, like the following. Initially: