Ad
  • Custom User Avatar

    Normally to "go to the next one" that's what while loop condition if for, but doing it with break keyword is fine too. And yep, break's only use in python is to break out of loop.

  • Default User Avatar

    i did it without em, you would only need them if you wanted to go to the next one and were stuck in a loop no ?

  • Default User Avatar

    Issue? Hardly. If you can't solve it, you can't solve it.

  • Default User Avatar

    same problem here, Array.slice(0) DOES NOT SOLVE THE ISSUE

  • Default User Avatar

    Very good Kata!!

  • Default User Avatar

    i said the stuff above to answer RealKenshiro's doubt

    it's not really necessary to change the random test generation.

    The only "issue" with this is that a user with an efficient solution may think wheter he did something wrong or not, seeing such an high time to complete.

    at most you can mention it in the description but it's a minor matter.

  • Default User Avatar

    Yes. I agree with all that. But it works. Why fix it? đŸ¤”

  • Default User Avatar

    What a great kata! I learned a lot. Thank you!

  • Default User Avatar

    I'm sorry. Please clarify the question. Each of the 3 lists a, b and c are 5K-10K length. This takes time. Agreed?

    The lists are generated by appending to end of list. It's a 6 Kyu, so no need for gymnastics because it works. Clear?

  • Custom User Avatar

    That depends on how the expected result is generated, if the random lists are generated and then the expected result with a control function, that would be expensive. Maybe one random list should be generated and then the three lists generated with some elements in common with that, that sounds cheaper. Note: I hadn't see the testing suite myself, only guessing.

  • Custom User Avatar

    Ok, I passed the tests...

    But I wonder how test generation can take such a long time, these are just random lists.

    Maybe lists with a special pattern?

    Thanks.

  • Custom User Avatar

    Nope, that 9s is reference solution + test generation and validation. It might be the case that reference solution actually takes 1s while rest of the time get eaten up by the test generation and validation.

  • Custom User Avatar

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

  • Custom User Avatar

    thank you my friend. apparently i forgot to delete those from my code. i often use print statements to see whats wrong with my code in my interpreter. when i copied my solution here i forgot to delete those print statements.
    finally my code works without time complexity. im so happy to finish this kata.

  • Default User Avatar

    Thx. I'll add to all.

  • Loading more items...