Ad
  • Default User Avatar

    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. ;-)

  • Default User Avatar

    I think the test cases in the PHP version have the params mixed up - i.e. "Expected" and "Actual" seem to be reversed.

  • Default User Avatar

    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.

  • Default User Avatar

    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. ;-)

  • Default User Avatar

    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".

  • Default User Avatar

    +1 Very elegant indeed. This makes everything I've ever written in JS look like rubbish ...