The following shared data structures must be declared as global variables such that they are shared by all threads
1.3 typedef a structure to represent the index (row and column) range of the elements in a Sudoku puzzle to be processed by each worker thread created by the parent thread. This structure must include the following four integers.
- int topRow; //index (0, 1, …, or 8) of top row to be checked by a worker thread
- int bottomRow; //index (0, 1, …, or 8) of bottom row to be checked by a worker thread
- int leftColumn; //index (0, 1, …, or 8) of left column to be checked by a worker thread
- int rightColumn; //index (0, 1, …, or 8) of right column to be checked by a worker thread
For example, in the format of (, , , ), the 1st column is represented by (0, 8, 0, 0), the 3rd column is represented by (0, 8, 2, 2), the 8th row is represented by (7, 7, 0, 8), the 2nd subgrid is represented by (0, 2, 3, 5), the 7th subgrid is represented by (6, 8, 0, 2), etc.