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 had a look at if after a good night's sleep ... and somehow I must have screwed up. It's all clear. Sorry, for bothering you. ;-)
If so they are mixed in all my PHP translations, tough work to change all that:-)
I think the test cases in the PHP version have the params mixed up - i.e. "Expected" and "Actual" seem to be reversed.
Good!! I'm happy for you!
I was finally able to optimize to recurse less deeply while still finishing in 1000-1250ms and it passes now. Thank's again for the fast support & the great kata. This was really an interesting one.
Thank you really much for the fast reply. I'm now pretty sure it's a limit to function level nesting, so I guess I'll have to modify my code somehow ... to be honest, I have no idea in the moment, how this kata can be solved without using any kind of recursion. ;-)
I just tried and had no problem so it doesn't seem to be a problem of the kata. It could be a problem in your code or a Codewars problem. You might try again if you are sure of your code.
The "Submit" tests are much longer than 225 ms, maybe 7 to 10 times more... unless you have a very good algorithm.
If you are sure of your code and nothing goes better, you could report it as a bug at CW.
I'm not sure if it's my solution or the PHP test cases, but I can't submit for some reason, but it won't tell me what went wrong.
After pressing submit it just shows (with red background/border):
Time: 255ms Passed: 0 Failed: 0
Test Results:
(green arrow) Sq2SquaresTestCases
(green arrow) testBasic
Can somebody please have a look at the PHP test cases, or advise what I can do here?
Doing "RUN TESTS" however seems to correctly run the basic tests (50 & 44) and shows "You have passed all tests".
+1 Very elegant indeed. This makes everything I've ever written in JS look like rubbish ...