Given a valid sudoku grid of size NxN, we might need to determine (for example for validation purposes), in which subsquare a specific cell belongs:
int squareIndex = (i / subsquareSize) * subsquareSize + (j / subsquareSize);
where subsquareSize = Math.sqrt(N);
No comments:
Post a Comment
With great power comes great responsibility