2022-11-22 09:24:36 +00:00
|
|
|
#ifndef S0037_SUDOKU_SOLVER_HPP
|
|
|
|
#define S0037_SUDOKU_SOLVER_HPP
|
|
|
|
|
|
|
|
#include <algorithm>
|
2022-11-30 10:20:36 +00:00
|
|
|
#include <cmath>
|
|
|
|
#include <unordered_map>
|
|
|
|
#include <vector>
|
2022-11-22 09:24:36 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2022-11-30 10:20:36 +00:00
|
|
|
class S0037 {
|
2022-11-22 09:24:36 +00:00
|
|
|
public:
|
2022-11-30 10:20:36 +00:00
|
|
|
void solveSudoku(vector<vector<char>> &board);
|
|
|
|
bool recusiveSolveSudoku(vector<vector<char>> &board,
|
|
|
|
vector<unordered_map<char, bool>> &rows,
|
|
|
|
vector<unordered_map<char, bool>> &cols,
|
|
|
|
vector<unordered_map<char, bool>> &grids, int row,
|
|
|
|
int col);
|
2022-11-22 09:24:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|