Comments on: Tower of Hanoi code https://demo.ritambhara.in/tower-of-hanoi-code/ Coding / System Design Interviews Tue, 14 Jun 2016 08:29:49 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: Vinay Veeravarapu https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1922 Tue, 14 Jun 2016 08:29:49 +0000 http://www.ritambhara.in/?p=1000#comment-1922 If there are 4 rods then what is the procedure?

]]>
By: Kamal Rawat https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1921 Tue, 22 Sep 2015 09:13:51 +0000 http://www.ritambhara.in/?p=1000#comment-1921 In reply to magda osman.

please feel free.. It will be great if you can mention the website as a source.

]]>
By: magda osman https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1920 Fri, 28 Aug 2015 06:10:37 +0000 http://www.ritambhara.in/?p=1000#comment-1920 Hi
is it possible to use your figure of the different states of solving the tower of hanoi task in a book chapter I am writing? The publishers require me to contact the originator of the figure – and to check with them if the figure can be used, and also, if you agree, I will need to know who to acknowledge.
Hope this is o.k
magda

]]>
By: Kamal Rawat https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1919 Mon, 04 Feb 2013 06:07:03 +0000 http://www.ritambhara.in/?p=1000#comment-1919 In reply to xyz.

This is a typical question asked in interview (mostly at the fresher level).. plus it is one of the applications of recursion.. i.e how you can use recursion to solve otherwise complex looking problem easily

]]>
By: xyz https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1918 Sun, 03 Feb 2013 07:43:01 +0000 http://www.ritambhara.in/?p=1000#comment-1918 In reply to krishnadas.

i cant understand this…whats the use of this

]]>
By: Kamal Rawat https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1917 Thu, 09 Aug 2012 04:20:55 +0000 http://www.ritambhara.in/?p=1000#comment-1917 In reply to krishnadas.

What you are saying is absolutely correct, but this solution is for 3 disks (my example & your solution in above comment) and is more from intuitive point-of-view (human).. What if I increase the number of disks to 10, it will become difficult for humans to do it.. Problem is to generalize it (its applicable for any n-number of disks) to write an Algorithm So that computer can solve it..
Compare it with Chess program, what looks obvious to human may be very difficult for computer to infer…
The 2nd solution (http://www.ritambhara.in/non-recursive-solution-to-tower-of-hanoi/) is highly optimized and takes the least number of steps.

]]>
By: krishnadas https://demo.ritambhara.in/tower-of-hanoi-code/#comment-1916 Wed, 08 Aug 2012 21:13:56 +0000 http://www.ritambhara.in/?p=1000#comment-1916 Arrey Rawat, regarding this “tower of Hanoi” problem ( heard this phrase for the first time)..can’t you do the following to minimize the steps:
Step 1: move the small disc from “s” to “e”
Step 2: Move medium disc from “s” to “e”
Step 3: Move large disc form “s” to d”
Step 4: move medium disc form “e” to d”
Final Step: move small disc from “e” to “d”
Thus, you accomplish in two less steps..unless I am missing something that I obviously don’t understand about computer science…??

]]>