Backtracking recursive algorithm for solving sudoku