Skip to content

Commit 146f3e9

Browse files
committed
Fix comments
1 parent 95f4a90 commit 146f3e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/others/TowerOfHanoi.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ private TowerOfHanoi() {
3434
*/
3535
public static void shift(int n, String startPole, String intermediatePole, String endPole, List<String> result) {
3636
if (n != 0) {
37-
// Recursively move n-1 discs from startPole to intermediatePole
37+
// Move n-1 discs from startPole to intermediatePole
3838
shift(n - 1, startPole, endPole, intermediatePole, result);
3939

4040
// Add the move of the nth disc from startPole to endPole
4141
result.add(String.format("Move %d from %s to %s", n, startPole, endPole));
4242

43-
// Recursively move the n-1 discs from intermediatePole to endPole
43+
// Move the n-1 discs from intermediatePole to endPole
4444
shift(n - 1, intermediatePole, startPole, endPole, result);
4545
}
4646
}

0 commit comments

Comments
 (0)