Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Solve a killer sudoku puzzle
ResourceFunction["SolveKillerSudokuPuzzle"][pos,vals] solves a killer sudoku puzzle based on the position pos of cages and the values vals associated with the cages. |
Solve the following killer sudoku puzzle:
In[1]:= |
Out[2]= |
Display the solved puzzle:
In[3]:= |
Out[3]= |
The cage positions are a List of sublists where each sublist contains the positions within that cage:
In[4]:= |
Out[4]= |
The cage values are the sums of the numbers at each position in the cage:
In[5]:= |
Out[5]= |
Solve the puzzle:
In[6]:= |
Out[6]= |
See the solution:
In[7]:= |
Out[7]= |
This work is licensed under a Creative Commons Attribution 4.0 International License