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

Method isSafe

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

Source from the content-addressed store, hash-verified

45 }
46
47 bool isSafe(vector<vector<char>>& board, int row, int col , char num)
48 {
49 return !isRowSafe(board,row,num) && !isColumnSafe(board, col, num) && !isBoxSafe(board, row-row%3,col-col%3,num) && board[row][col] == '.';
50 }
51
52
53 bool findUnassignedLocation(vector<vector<char>>& board, int &row, int &col)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected