Skip to content

Commit 79e2eb2

Browse files
Removed unrequired Package
1 parent 7df4e98 commit 79e2eb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Misc/TowerOfHanoiUsingRecursion renamed to Misc/TowerOfHanoiUsingRecursion.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
package com.manmeet;
2-
31
import java.util.Scanner;
42

5-
public class TowerOfHanoi
3+
class TowerOfHanoi
64
{
75
public static void shift(int n, String startPole, String intermediatePole, String endPole)
86
{
97
if (n == 0) // if n becomes zero the program returns thus ending the loop.
108
{
119
return;
1210
}
11+
12+
1313
// Shift function is called in recursion for swapping the n-1 disc from the startPole to the intermediatePole
1414
shift(n - 1, startPole, endPole, intermediatePole);
1515
System.out.println("\nMove \"" + n + "\" from " + startPole + " --> " + endPole); // Result Printing

0 commit comments

Comments
 (0)