Start from the first cell of the board and proceed to the next empty cell.
Try placing numbers from 1 to 9 in the current empty cell.
For each number, check if it's a valid placement (not already present in the same row, column, or 3x3 sub-box).
If the placement is valid, place the number and move to the next empty cell using recursion.
If the placement leads to a dead end (no valid number can be placed in the next empty cell), backtrack by removing the last placed number and try the next one.
Repeat steps 2-5 until the board is completely filled with a valid solution or all possibilities have been exhausted.