Removed unrequired Package

This commit is contained in:
Balance-Breaker
2017-10-03 12:38:23 +05:30
parent 7df4e980c4
commit 79e2eb2826

View File

@ -1,8 +1,6 @@
package com.manmeet;
import java.util.Scanner; import java.util.Scanner;
public class TowerOfHanoi class TowerOfHanoi
{ {
public static void shift(int n, String startPole, String intermediatePole, String endPole) public static void shift(int n, String startPole, String intermediatePole, String endPole)
{ {
@ -10,6 +8,8 @@ public class TowerOfHanoi
{ {
return; return;
} }
// Shift function is called in recursion for swapping the n-1 disc from the startPole to the intermediatePole // Shift function is called in recursion for swapping the n-1 disc from the startPole to the intermediatePole
shift(n - 1, startPole, endPole, intermediatePole); shift(n - 1, startPole, endPole, intermediatePole);
System.out.println("\nMove \"" + n + "\" from " + startPole + " --> " + endPole); // Result Printing System.out.println("\nMove \"" + n + "\" from " + startPole + " --> " + endPole); // Result Printing