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'm happy I was able to solve it. Initially my modified 6x6 solution reached 50 sec on first hidden test on the Attempt. I found several enhancements and was able to make it even more efficient - 30 sec, lol. So, I had to completely rework solution, think about new algorithm and I've reached success. For those who stumbled I'd suggest study AC-3 algorithm. My graded attempt (all tests) took 1.7 sec. This 7x7 task took 2 weeks of my leisure time and I'll definitely take a break, or maybe not :)
This is something incredible!...
I already forgot when I mobilized all my forces to solve a problem.
At some moment, it became a matter of honor. My first achievement was when I got the first pass for test number 3 in 50 s. I ended up with a 1-second result for all tests in the attempt.
It looks funny that I still haven't been able to solve the puzzle on a piece of paper, and after all I'm definitely not even going to try to learn how to do it. :)
I don’t know whether it will be a good advice for those who stumbled at the beginning - I'd share that initially I solved the task with a bruteforce, so you can try it first. Of course it wasn't enough to fit in the timeframe for the test runs.
concize, but hard to understand, so it's clever as well as it's not a best practice
Nothing special. As it said - throwed exception is other then requested. I'll add that it violates CleanCode. So it is one of the apropriate solutions but defenitelly not a best practice.
this is 100% plagiarism of the top solution
this is wrong solution, i wonder how it has passed tests??? Cause k could be 2 than the max m could be almost a sqrt of integer max_value. Here we see just 300 as max m.
That could be passed only accidently. It will fail randomnumber test in most runs
r declaration is redundant in the first lines
recursive invocation should be placed as a last operand in return to reach tail recursion
i can mark it as clever,cause it simple, the simpler the better, but this is not the best practice