| 12 | vector<vector<int>> ans; |
| 13 | |
| 14 | bool isSafe(vector<vector<int>>& board, int r, int c, int n){ |
| 15 | for(int i=0;i<r;i++){ |
| 16 | if(board[i][c]==1){ |
| 17 | return false; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | for(int i=r-1,j=c-1;i>=0 && j>=0; i--,j--){ |
| 22 | if(board[i][j]==1){ |
| 23 | return false; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | for(int i=r-1,j=c+1;i>=0 && j<n; i--, j++){ |
| 28 | if(board[i][j]==1){ |
| 29 | return false; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | void helper(vector<vector<int>>& board, int n,int r){ |
| 37 | if (r==n){ |
nothing calls this directly
no outgoing calls
no test coverage detected