Question
/* TODO: * Returns 1 if and only if the board is in a valid Sudoku board state. * Otherwise returns 0. * * A
/* TODO: * Returns 1 if and only if the board is in a valid Sudoku board state. * Otherwise returns 0. * * A valid row or column contains only blanks or the digits 1-size, * with no duplicate digits, where size is the value 1 to 9. * * Note: p2A requires only that each row and each column are valid. * * board: heap allocated 2D array of integers * size: number of rows and columns in the board */ int valid_board(int **board, int size) { return 0; }
I need help with this TODO section. The program will receive a sudoku board and this function determines whether there is any duplicate (invalid) in the sudoku board. The project is only required to check its rows and columns. An example of a board is like this:
1,0,3 0,2,4 5,0,9
Which is a valid board. The number 0 is an empty space which will be filled by the user.
I just need to check for duplicates and ignore the 0 as empty spaces.
Can someone plz help me with this in C programming language.
Appreciate it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started