Welcome to the 10th PHP Coding Puzzle !

The Sudoku Game

The objective of Sudoku is to fill a 9×9 grid with numbers so that each row, column, and 3×3 sub-grid (or “box”) contains all of the digits from 1 to 9.

To solve a Sudoku puzzle, you need to use logic and deduction to determine the correct numbers to fill in each cell of the grid. The puzzle starts with some cells already filled in, and your job is to fill in the remaining cells correctly.

Here’s an example of a partially filled-in Sudoku grid:

5 3 _ | _ 7 _ | _ _ _
6 _ _ | 1 9 5 | _ _ _
_ 9 8 | _ _ _ | _ 6 _
------+-------+------
8 _ _ | _ 6 _ | _ _ 3
4 _ _ | 8 _ 3 | _ _ 1
7 _ _ | _ 2 _ | _ _ 6
------+-------+------
_ 6 _ | _ _ _ | 2 8 _
_ _ _ | 4 1 9 | _ _ 5
_ _ _ | _ 8 _ | _ 7 9

To solve this puzzle, you would start by looking for cells that can only be filled with one number based on the numbers already filled in on the same row, column, and box. For example, in the first row, the only possible number for the third cell is 1, because the numbers 2, 4, 6, 8, and 9 are already in that row.

Once you have filled in all the cells that can only have one possible number, you can start looking for cells that have only two possible numbers, and use deduction to determine which one is correct.

You continue this process of deduction until you have filled in all the cells in the grid correctly.

There are many variations of Sudoku puzzles, including different grid sizes, shapes, and numbers of starting cells. However, the basic rules and solving techniques are the same for all variations.

To play Sudoku, you can either use a printed puzzle book or an online Sudoku game. There are also many Sudoku solver programs available that can help you solve difficult puzzles.

The solution is already available in the next page 😉 Feel free to share with us your solution here in comments or Github.

LEAVE A REPLY

Please enter your comment!
Please enter your name here