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

Method isColumnSafe

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

to check whether num is valid in that column

Source from the content-addressed store, hash-verified

20
21 // to check whether num is valid in that column
22 bool isColumnSafe(vector<vector<char>>& board, int col , char num)
23 {
24 for(int row = 0; row<9; row++)
25 {
26 if(board[row][col] == num)
27 return true;
28 }
29 return false;
30 }
31
32 // to check whether num is valid in that 3*3 matrix grid
33 bool isBoxSafe(vector<vector<char>>& board, int row1, int col1 , char num)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected