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.
I've managed to optimize it after profiling for few hours, but it still takes almost 10 seconds for those 100 tests. Insanely hard.
Your diagnostics seem to be terribly wrong, because it seems to me that you are printing times of each recursive sub-call and not of a solution as a whole. After measuring total times of your solution, I got following logs:
It seems that your solution handles some cases poorly, because times go up to 1.5s+
I can send you my implementation of the solve and measurements later if you want.
Python
In what language?
This comment is hidden because it contains spoiler information about the solution
A year is a little extreme, but glad to see you did it!
It was very difficult for me. I even gave up CodeWars for a year because I couldn't solve this problem in 2023. I don't like my solution because it's clumsy. But it worked! I'm glad I was able to solve this!
good for you man, im still timing out from using the backtracking approach :(
EDIT: I'm sorry, i used some code on github for the solution. Before anyone says anything, I probably shouldn't have done that, however I have spent some time reading the code, and I can fully understand it now. I think the point of codewars is to learn, but sometimes give up if it is too difficult. And for the reason why I did that, well, it's late now, so I got frustrated and just copy pasted some code off the internet.
This was a very challenging and fun kata! It required a lot of thought about which data structure and which algorithm to use to minimize the number of computations. In the end it was worth it and I managed to pass it marginally.
well, this one is insane
A correctly composed Sudoku must have a unique solution !
timing out from backtrack :(
js plz
Its 5 per test.
Loading more items...