Skip to content

Commit 397b3b4

Browse files
committed
minor change and comment
1 parent e18d343 commit 397b3b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import java.util.LinkedList;
44
import java.util.Queue;
55
import java.util.Scanner;
6-
6+
// Java program to find minimum number of dice
7+
// throws required to reach last cell from first
8+
// cell of a given snake and ladder board
79
public class SnakeAndLadder {
810
public static class QueueEntry {
911
//cell number
@@ -59,7 +61,7 @@ public static void main(String args[]) {
5961

6062
//Representation of the board as graph
6163
//If there are no snakes or ladders starting from a cell, we mark it as -1
62-
//If there is a snake or ladder, we assign the ending position of the snake and ladder
64+
//If there is a snake or ladder, we will assign the ending position of the snake and ladder
6365
int[] graph = new int[numberOfCells];
6466
for (int i = 0; i < numberOfCells; i++) {
6567
graph[i] = -1;

0 commit comments

Comments
 (0)