#include <iostream>
bool is_legal(const int sud[][N*N], int row, int col, int val);
bool is_col_ok(const int sud[][N*N], int row, int col, int val);
bool is_sqr_ok(const int sud[][N*N], int row, int col, int val);
int main()
input_sud(sud);
fill_sud(sud, 0, 0);
print_sud(sud);
return 0;
if(row == N*N)
return true;
if(sud[row][col] != EMPTY)
// We're about to try and find the legal and appropriate value
sud[row][col] = value;
return true;
// Trial failed!
sud[row][col] = EMPTY;
}
// None of the values solved the sudoku.
return false;
bool is_legal(const int sud[][N*N], int row, int col, int val)
return true;
bool is_col_ok(const int sud[][N*N], int row, int col, int val)
return true;
}
//========= Is Square OK =========//
bool is_sqr_ok(const int sud[][N*N], int row, int col, int val)
return true;