Ad
  • Default User Avatar

    This is incredibly complex, but cool. Bravo!

  • Default User Avatar

    "Focus on efficiency" at the end of kata description is the hint what you shoud do.
    You'll have to optimize your code...

  • Default User Avatar

    I agree: rank should be higher. Not because of the task difficulty, but due to big amount of optimizations necessary to pass the time limit of tests.

  • Default User Avatar

    Funny kata. I had to prepare 4 solutions, one faster than the other. All tests passed, but still too slow.
    Out of curiosity I compared the final one to the one in test evaluation (much more elegant, but slower): mine was 5 times faster (my dblLinear(100000) was 4.4s, "original" 22.7s) !

    So most of the time wasted during test was not because of my solution(s), but because of the test evaluation itself. That's sad...
    On the other hand I've learned a lesson about speed of PHP array operations, so I'm somewhat satisfied...