Recursive Tower of Hanoi Solution

Hello!

To view this page you need Microsoft Silverlight 3 plug-in.
Silverlight will enable your browser to understand complex Rich Internet Applications.
After installing (~10 seconds), you will be able to view and execute live algorithms.

Click here to download the plugin directly from Microsoft (4 MB)
If you want to learn more about MS Silverlight, take a look at this Wikipedia article.
Output
type in the input above and click 'Execute'
the result will be outputted here
Related Algorithms
Discussion
4
Eh, if you want to change it back just edit it, change to your version, and save it over -- Just you did not have your stuff in an execute method and were calling the write from within the algorithm. For more flexibility format text outside algorithm and just return the necessary data (disk-pin pair array or something). Same recursive logic kept.
30 months and one week ago by bh3
Hello bh3! I fixed the interpreter and now it replaces new lines (\n) with HTML br-tag. Thanks!
30 months and one week ago by ANaimi
bh3, I deleted your duplicate submissions. I hope it's okay with you. This is just for the sake of reducing redundancy. You can always overwrite your recent submissions rather than creating a new version.
30 months and one week ago by ANaimi
Oh alright, sorry didn't know I could overwrite versions, was myself a little concerned with polluting the versions thing a bit with the combination of me seeing if the issue with the new lines was on my side of the coding and a few mistakes. Thanks.
30 months and one week ago by bh3
login to leave a comment
Version 7
Version 2 by JAnderton
+1
Version 7 by bh3
+1
Version 8 by sakura
0
The Tower of Hanoi or Towers of Hanoi (also known as The Towers of Brahma) is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks neatly stacked in order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:
* Only one disk may be moved at a time.
* Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod.
* No disk may be placed on top of a smaller disk.

http://en.wikipedia.org/wiki/Tower_of_Hanoi

Note: Algorithmatic only displays single line outputs in regular view :-(
By bh3
30 months and one week ago
up down

implementations

3 versions available

rated by

one user - list?

viewed by

4 users - list?

favorited by

0 users - list?

last activity

30 months and one week ago