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

Method solve

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

Source from the content-addressed store, hash-verified

67
68
69 bool solve(vector<vector<char>>& board)
70 {
71 int row,col;
72 if(!findUnassignedLocation(board, row, col))
73 return true;
74
75 for(char i = '1' ; i<='9';i++)
76 {
77 if(isSafe(board,row,col,i))
78 {
79 board[row][col] = i;
80
81 if(solve(board))
82 return true;
83
84 board[row][col] = '.';
85 }
86 }
87
88 return false;
89 }
90
91 /* A utility function to print grid */
92 void printGrid(vector<vector<char>>& board)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected