Ad
  • Custom User Avatar

    you were right!

    i did change now my old version, thx to you're comment.
    just by moving the ships variable into the function and use "global ships" its now a working solution too. and pretty similar to my code with the class

  • Custom User Avatar

    yes. i ran into the same problem. there is something wrong with the random tests for Python.

    solution:
    changed functions based code into class

    a class always makes a new instance for all atributes (variables), this solved the issue and passed it!
    after long long time looking whats wrong with my code...

    looks like the random tests do not clear all data and keep randomly data from the previous test...

  • Custom User Avatar

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

  • Custom User Avatar

    At other Kata, i had trouble with:
    i finaly did it, i checked solutions, wondering why those worked and my former version didn't.
    turned out: some solutions did NOT work. got timeout.

    Someone wrote the preformance tests changed, by Codewars, over the years.

    could it be that it happend here too? changes of Codewars test made it hardly possible to finish now?

  • Custom User Avatar

    I DID IT!!!

    was quite some work to get it done... passed the last 100000 test in time, but had trouble to find a solution for the 1.000.000.

    so i was looking at other solutions, tried others out... looking at the
    and found solutions that didn't pass the attempt.

    are those old once, and test got changed?

  • Custom User Avatar

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

  • Custom User Avatar

    okay... this is the worst Kata im doing sofar.
    why?
    The very first test on Attempt, is ment to kill your code, without a way to figure out why.
    I belive thats on purpose. It's not a good learning experience.

    maybe the kyu 5 is wrong? Im kyu 6.

    atleast i learned to aboard the code in a way so i get some info on the attempt-test. thank you.

    but same as others wrote here:
    it feels like cheating, to solve this kata. i don't think that is ment for beginners.