Ad
  • Default User Avatar

    did you try in a fork of a solution, to go around that possibility?

    EDIT: I just tried that for another purpose: same perf, apparently...

  • Custom User Avatar

    I start to wonder if CW changed something in their backend, as it used to be more stable before; either that or when you try to edit/create a kata it makes calls to some more dedicated resource, mh...

  • Default User Avatar

    Hi,

    Yeah right! ;) I believe I had my mind a bit clouded at this time. Failure again and again... not good to keep a clear mind (But still... Tried the code above again and never got anything else than a timeout, today... :o That's really weird... Nevermind... ;) )

    EDIT : btw, "carrying capacity" is on its way? ;)

  • Custom User Avatar

    Run it a number of times and never got above 5 seconds: are you sure you cannot make it without the set and/or there are no further improvements? Afterall it is meant to be an optimization kata, so not sure how I could improve things further without spoiling it, mh...

  • Custom User Avatar

    Thanks for your feed :)

    Any idea on how to test if primes is in a given range otherwise?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Sorry mate.

  • Default User Avatar

    spoiler flags, please... (these comments are visible from the dashboard, even from those who haven't yet complete the kata)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Hello, interestring kata for applying memoziation :)
    I have one question on the Python version : why testing with booleans ?
    Like :
    Test.assert_equals(abs(len(primes)-5)<3,True)
    Test.assert_equals(abs(len(primes)-9)<3, True)

    At first i used the global primes list that would fail on the first of the abose test, re declaring it in the function (so keeping the global one unchanged) made the fisrt of the above test succeed, but it's not a clean solution - and you loose previous computations. Such function may raise a TypeError for boolean inputs.

    Eventually printing n did not seem to work for boolean input, nothing to do with your kata but still annoying when debuging.