Tower of Honai Problem

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 ?

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);

@O17LPOLA020023 thanks bro after i see my code again it working fine but i am thinking wrong :slight_smile:

mark your doubt as resolved if you have no further query.

@O17LPOLA020023 in discussion section there is not option to marks as resolve

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.