Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
I haven't spent much time looking at your code, but you don't seem to verify that any numbers you insert are unique in row, column, or square. Insert too many numbers and there won't be a valid answer. I have a Kotlin code that does it, which you could look at. I put a single 1 to 9 into random spots and use recursion to solve the puzzle. It goes on to remove random numbers to finish with a puzzle to play.
4th Sep 2018, 9:45 PM
John Wells
John Wells - avatar