We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a50395 commit bf9fdd0Copy full SHA for bf9fdd0
src/main/java/com/fishercoder/solutions/_1091.java
@@ -5,6 +5,7 @@
5
6
public class _1091 {
7
public static class Solution1 {
8
+ //you can count in the normal four directions first, then count the diagonal ones to form this array
9
int[] directions = new int[]{0, 1, 1, 0, -1, 1, -1, -1, 0};
10
11
public int shortestPathBinaryMatrix(int[][] grid) {
0 commit comments