Tower of Hanoi doubt

sir why i an getting different ans . plz correct it

you have done mistake while printing
you forgot to put space after “ring”

Modified Code

sir i corrected the code as u said but still it doesn’t pass any test case

actually you have to move ring from A to B with the help of C
but you are moving ring from A to C with the help of B
i have corrected your code
Modified Code

check now

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.