Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@Erhu, proving that sudoku has multiple solution may be done in different ways and one of them is not that time-consuming.
Think of what it means that there are several solutions in terms of the resulting elements positions & values.
@akar-0 Thanks for the advice, the difficulty is definitly in the back tracking, but like mentioned, the test results are inconsistent and it makes it hard to debug.
I run my solution 20 times. I got 4 timeouts, and remaining 16 runs had quite comsistent times of 5-8s. So yes, it seems that its possible to get a pessimistic case, but I think the ratio is not terrible, and i also think there is many better solutions than mine.
All katas have random tests (or should have). You give no proof that tests would be buggy. If you have not been able to solve this kata (I have not either) this cannot be considered a kata issue.
Try to practica on easier ones, 2kyu katas are supposed to be hard coding challenge.
The tests are randomly generate, you just have to get lucky and not run into bugged one.
How did others, including me, solved it then?
It could have been a good test but proving sudoku has single solution requires backtracking, which make the job time out, mainly because of the 200 random tests.