Check for duplicates in rows, columns and squares in Sudoku