Algorithm to validate a sudoku answer