import java.util.Scanner;
public class towerofhanoi {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
System.out.println(Tohcount(n,"src","dest","helper"));
}
public static int Tohcount(int n, String src, String dest, String helper) {
if (n == 0) {
return 0 ;
}
int ch = 0;
ch = ch + Tohcount(n - 1, src, helper, dest);
System.out.println( "move " + n + "th disk from " + src + " to " + dest);
ch = ch + Tohcount(n - 1, helper, dest, src);
return ch + 1;
}
}
what is wrong in this code it is not passing test cases???