running fine in eclipse
plz see where is the problem
Everything is fine but still wrong ans
hey @Vishu_1801
Read this line Carefully T1 be the Source Tower, T2 be the Destination Tower and T3 be the Auxillary Tower.
public static void printtoh(int n, String src, String dest, String helper) {
if (n == 0) {
return;
}
printtoh(n - 1, src, helper, dest);
count++;
System.out.println("Move " + n + "th disc from " + src + " to " + dest);
printtoh(n - 1, helper, dest,src);
}