22
edits
Changes
TriForce
,→Assignment 1: Sudoku Solver
/* Returns a boolean which indicates whether an assigned entry
for (int row = 0; row < 4; row++)
for (int col = 0; col < 4; col++)
return true;
return false;
/* Returns a boolean which indicates whether it will be legal to assign
{
/* Check if 'num' is not already placed in current row,
current column and current 4x4 box */
return !UsedInRow(grid, row, num) && !UsedInCol(grid, col, num) && !UsedInBox(grid, row - row%4 , col - col%4, num)&&
grid[row][col]==UNASSIGNED;
}
return 0;
}
25x25 Puzzle: