The objective of Soduku game 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 (also called “boxes”, “blocks”, “regions”, or “sub-squares”) contains all of the digits from 1 to 9. A solved Soduku game is like:
To check if a 9×9 grid is a valid solution, we need to check every row, every column and 3×3 subgrids. It is not hard to check rows and columns, but checking subgrids is little tricky. When considering going through the grid only one time, it will be much harder.
- See more at: http://bo-yang.github.io/2014/06/14/soduku/#sthash.0oHrpRX2.dpuf