-
Notifications
You must be signed in to change notification settings - Fork 0
/
sudoku_functions.hpp
25 lines (24 loc) · 1.01 KB
/
sudoku_functions.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <vector>
#include <string.h>
#include <typeinfo>
#define N 9
using namespace std;
void generateRow(int (&grid)[9][9]);
bool isPresentInCol(int (&grid)[9][9], int col, int num);
bool isPresentInRow(int (&grid)[9][9], int row, int num);
bool isPresentInBox(int (&grid)[9][9], int boxStartRow, int boxStartCol, int num);
void printSudoku(int (&grid)[9][9]);
bool findEmptyPlace(int (&grid)[9][9], int &row, int &col);
bool isValidPlace(int row, int col, int num);
bool solveSudoku(int (&grid)[9][9]);
void fillBlanks(int (&grid)[9][9]);
int getHint(int (&grid)[9][9], int &hints);
bool isNumber(string s);
bool checkBlanks(int (&grid)[9][9]);
bool checkSudoku(int (&grid)[9][9]);
bool isOccupied(string command, int (©_grid)[9][9]);
void copyGrid(int (&grid)[9][9], int (©_grid)[9][9]);
bool checkCol(int (&grid)[9][9], int row, int col, int num);
bool checkRow(int (&grid)[9][9], int row, int col, int num);
bool checkBox(int (&grid)[9][9], int boxStartRow, int boxStartCol, int row, int col, int num);