I will be following Backtracking Algorithm to solve this problem.
The algorithm works something like this:
- Pick empty box.
- Try all numbers.
- Find one that works.
- Backtrack when the sudoku rules are broken.
- Repeat the above steps until all the boxes are filled up.