MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / isRowSafe

Method isRowSafe

C++/Sudoku-Solver.cpp:11–19  ·  view source on GitHub ↗

to check whether num is valid in that row

Source from the content-addressed store, hash-verified

9
10 // to check whether num is valid in that row
11 bool isRowSafe(vector<vector<char>>& board, int row, char num)
12 {
13 for(int col = 0;col<9;col++)
14 {
15 if(board[row][col] == num)
16 return true;
17 }
18 return false;
19 }
20
21 // to check whether num is valid in that column
22 bool isColumnSafe(vector<vector<char>>& board, int col , char num)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected