(int[][] grid)
| 63 | return false; |
| 64 | } |
| 65 | public int numMagicSquaresInside(int[][] grid) { |
| 66 | int rows = grid.length; |
| 67 | int cols = grid[0].length; |
| 68 | int count=0; |
| 69 | // rows * cols * (2 [3*3]) |
| 70 | for(int i=0;i<rows-2;i++){ |
| 71 | for(int j=0;j<cols-2;j++){ |
| 72 | if(isMagicSquare(grid,i,j)){ |
| 73 | count++; |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | return count; |
| 78 | } |
| 79 | } |
nothing calls this directly
no test coverage detected