Not getting same answer

when input is 4

Hi @debojyoti.koley.dk
I have corrected ur code… https://ide.codingblocks.com/s/604533
its working fine… i have also changed variable names for better understanding

But @Vaibhav277 sir I have written the same code as the tutorial. But still not working, I am not getting where is the error. If you please explain where is the error that will be really helpful to me. Thank you.

And one more thing I am considering A = source , B = helper , C = Destination. Please don’t change the order.

bro read the question… B is ur destination… A is ur source and C u are using as helper…
’ Using a helper stick (peg), shift all rings from peg A to peg B using peg C .’

@Vaibhav277 got it … my bad, I accidentally missed that line. Thank you.

hope ur doubt is cleared now

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.