Tower of hanoi doubt


why are all test cases failing ?

Hey @kumarsaksham601

#include <iostream>
using namespace std;
void move(int n,char sor,char help,char dest)
{
    if(n==0)
    return;
    move(n-1,sor,dest,help);
    cout<<"Moving ring "<<n<<" from "<<sor<<" to "<<dest<<endl; //change 2 we cout<<src <<dest
    move(n-1,help,sor,dest);
}
int main() {
    int n;
    cin>>n;
    move(n,'A','C','B'); //change 1 dest is B
}

If this resolves your query then please mark it as resolved :slight_smile: