Ad
  • Default User Avatar

    I was amazed when I saw this. I was trying the same code without using semicolons and it just doesn't work, the yield statement goes all the way to the destructuring assignment, yielding the whole array [curr, next].

  • Default User Avatar

    I second this."Passed: 23, Failed: 0, Exit Code: 1", even with empty "fib()" it times out.

  • Default User Avatar

    Hello! Very interesting and challenging kata.

    I solved this for JS but it seems like O(logn) solution passes the random tests by a low margin (mine passes at 11600ms, although I only tweaked the algorithmic approach and not delve too much into code optimization). I think the len(B) === 5 along with the number of tests introduces too much variance. Did anyone else experience this as well?

  • Default User Avatar

    I can't believe this is possible. I mean, i expected append() to behave as a pass-by-reference at best, but this is something else, it feels like the language (interpreter...) is creating some obscure references and when something is being modified, it translates to everywhere in real-time (kind of a really really bizarre observer pattern)

  • Default User Avatar

    My solution works only if i select Python 3.4 (or something like that) but it does not work on python 2.7 (changing version automatically passed all the test with the same code)

    I do think it's a bug as it may create unexpected errors.

  • Default User Avatar

    I can pass 5/6. I only fail at randomTest:

    arrays first differed at element [0][0]; expected:<1> but was:<0>

    i tried to hardcode a <1> at [0][0] but it raises:
    arrays first differed at element [0][0]; expected:<0> but was:<1>

    I do believe there is a problem in the test. I was trying to solve this using a backtracking for funsies. I will try other techniques and fill in the results.

  • Default User Avatar

    This is some quality stuff.

  • Default User Avatar

    It was some hard work to make decompose(pow(2,31)) work below 8 sec. I fear there is a better solution using some theorems, but i prefered a hard coded backtrack.

  • Default User Avatar

    Nice kata.

  • Default User Avatar

    I feel like i should've put 5050 instead of the whole calc. But well, a general solution....

  • Default User Avatar