sudoku is a number-placement puzzle. the objective is to fill a 9 × 9 grid with digits so that each column, each row, and each of the nine 3 × 3 sub-grids that compose the grid contains all of the digits from 1 to 9. this algorithm should check if the given grid of numbers represents a correct solution to sudoku.