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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!