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.
When an issue is specified, the language has to be noted, with insuffient information.
If this is still an issue, please reraise noting the language(s) which need to be addressed.
.
Harder one? I even included 2 puzzles that are imperfect / have multiple solutions if you dare to try the beta and collaborate to make it approved!
http://www.codewars.com/kata/hard-sudoku-solver
The test cases need some rework anyway (at least in the Haskell version). So if you feel like it, you could write your own Kata with generator and validator.
I guess mine runs in
O(n^4)
, wheren
is the grid size (only if block size is fixed). I'm interested how you could improve that. Often times you just combine randomness, luck and a heuristic approach (e.g. first check columns/rows/blocks with few missing elements), this could maybe somehow lead toO(n^2)
. But I guess I'm not wasting enough time with playing sudokus. :)This is a very fun kata. It might be fun to find a way to compare runtimes with other solutions -- this is a case where there are a bunch of solutions and some might be much faster than others.
There are some implementation difficulties I can think of that might make this kind of comparison difficult, though.
Try testing with numbers in the range mentioned in the description. Also, try testing with negative n's.
I don't know if this is an issue with the kata's setup, or if it's the site itself, but my solution keeps failing to execute. All my unit tests are passing, including fib(1000), and they take < 1s. The kata's unit tests, however, aren't even running anymore. They just keep failing with "Unknown error" or "Process was terminated. It took longer than 6000ms to complete".
I loved this kata. Maybe it's an idea to create the same one with harder puzzles at a higher kyu level? I was itching to implement some of my own more advanced deterministic sudoku algorithms (I can't help but make those up while playing sudoku), but wanted to keep the runtime reasonable for this kata :p
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution