i implemented recursive logic which was explained by prateek bhaiya but then why the test case is going wrong?
Tower of hanoi? wrong answer
Hello @vashish888 ,
Your logic is correct.
But your code is not producing desired output because of a silly mistake that you have done.
The following statement is causing wrong output:
toh(n,‘A’,‘C’,‘B’);
Solution:
Read the question carefully.
Hope, this would help.
Give a like, if you are satisfied.
1 Like
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.