(int [][]board)
| 9 | |
| 10 | class Solution { |
| 11 | public int count(int [][]board){ |
| 12 | int c = 0; |
| 13 | for(int i=0; i<board.length; i++){ |
| 14 | for(int j=0; j<board[0].length; j++){ |
| 15 | if(board[i][j] == 1){ |
| 16 | c++; |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | return c; |
| 21 | } |
| 22 | public void dfs(int r, int c, int[][] board){ |
| 23 | if(r<0 || c<0 || r>board.length-1 || c>board[0].length-1 || board[r][c] != 1) return; |
| 24 |
no outgoing calls
no test coverage detected