Getting wrong output
It is given : shift all rings from peg A to peg B using peg C
So C must be the helper.You have taken B as helper in the code. So swap the positions of B and C in the function call.
It is given : shift all rings from peg A to peg B using peg C
So C must be the helper.You have taken B as helper in the code. So swap the positions of B and C in the function call.