I made 9 x 9 Matrix with all numbers allocated randomly. Then, I checked if all columns, rows, and 9 3by3 matrices have no repeated numbers.
However, this algorithm takes so much time to generate correct sudoku matrix. At first, I didn't realize how bad this is. So, I made 2 by 2 matrix with same algorithm, But It took so long time to find correct Matrix even it has only 4 numbers!!
Now, I think that it is because I made whole matrix and then judged if it is well made. So I would make another algorithm.
'공부(Study)' 카테고리의 다른 글
First Win32 Project (0) | 2017.02.15 |
---|---|
Start studying MFC (0) | 2017.02.15 |
Sudoku Game with C++ - day 2 (0) | 2016.07.08 |
Sudoku Game with C++ - day1 (0) | 2016.07.06 |
Java Study - day1 (0) | 2016.07.06 |