I'm trying to solve a computer science challenge and have readily been able to validate whether or not the outside dimensions of a sudoku puzzle are valid. However, it doesn't check the validity of the inside squares and will "validate" the following incorrect sudoku puzzle because the 3x3 squares are not unique 1-9:
[1, 2, 3, 4, 5, 6, 7, 8, 9],
[2, 3, 4, 5, 6, 7, 8, 9, 1],
[3, 4, 5, 6, 7, 8, 9, 1, 2],
[4, 5, 6, 7, 8, 9, 1, 2, 3],
[5, 6, 7, 8, 9, 1, 2, 3, 4],
[6, 7, 8, 9, 1, 2, 3, 4, 5],
[7, 8, 9, 1, 2, 3, 4, 5, 6],
[8, 9, 1, 2, 3, 4, 5, 6, 7],
[9, 1, 2, 3, 4, 5, 6, 7, 8]
My question is this: if a sudoku puzzle has all valid columns and rows in the 9x9, is there a way to grab a single other set of values from the puzzle (say, for instance, the first 3x3) and know the whole puzzle to be correct? Or must one check every 3x3 for an otherwise valid whole puzzle square?