I am trying to place to n-1 tile from sources to helper A to C which i says that recursion will shift the n-1 for me and then i just need to place the nth tile to correct postion. I am thinking it ways. and after that i need to place the n-1 tile from helper to destination. I am wrong in that ways ?
Tower of Honai Problem
Hi @Vikaspal, what you are thinking is indeed right , what we are doing is first using recursion place top n-1 rings to the helper using recursive call towerofhonai(n-1,source,helper,destination); and placing the last ring at the destination and finally placing the rings from helper to destination using recursive call towerofhonai(n-1, helper, destination, source);
mark your doubt as resolved if you have no further query.
don’t worry i will do it
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
