This post specially dedicated to Anjana Ramamoorthy from Microsoft.
Below is the procedure sc.cp_Create_MetrixPosibilities_nXn which will take matrix size as parameter and create the table dbo.MetrixPosibilities_nXn with all valid Sudoku possibilities.
Below are parameters for the procedure sc.cp_Create_MetrixPosibilities_nXn.
- Size of matrix for which we want to create all the possibilities.
Suppose, we have 3X3 matrix for which I want to create all valid possibilities then we can execute procedure as below.
EXEC sc.cp_Create_MetrixPosibilities_nXn 3
Select count(1) From dbo.MetrixPosibilities_3X3
Here, we have 12 valid possibilities created as below in table dbo.MetrixPosibilities_3X3.
Below are the scripts to download.
Please keep watching for the second post.
Write T-SQL code to take m valid values from User and provide all valid Sudoku possibilities for nXn matrix
Post a Comment