Ad
  • Custom User Avatar

    Resolved

  • Custom User Avatar

    Yeah, output is (23, 23) now. I thought the tests are isolated. Ok, I'll take care about it. Thank you!

  • Custom User Avatar

    "The problem is, memo isn't reset, it keeps its value"
    Is it the solution problem? Then don't understand why.
    Or tests problem?

  • Custom User Avatar

    "Have you tried locally calling your function more than once?"
    Sure, many times, with the same or different pyramids, but one per try.

    "...distinguish between '11' + '10' and '111' + '0'?"
    Didn't think about it. Looks reasonable. The test suite is pretty small, probably need to make it bigger

  • Custom User Avatar

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

  • Custom User Avatar

    share it here?

  • Custom User Avatar

    Is it possible to get the same result for all the tests? I get 23, which is correct only for sample test #1. It seems like the tasts share it's state, because if I print out the memo dict, then it's the same for all tests. Meanwhile, on my computer I get different results with the same code for different pyramids (e.g 1074 for medium pyramid). Actually, I have another, not optimized solution and it passes all the tests.

  • Custom User Avatar

    And finally I'm done!!! Found a couple of bugs in solution logic (lack of extra loop).

    The clue was extreme logging/printing when debugging move by move and even shot by shot!

  • Custom User Avatar

    And finally I'm done!!! Found a couple of bugs in solution logic (lack of extra loop)

    The clue was extreme logging/printing when debugging move by move and even shot by shot!

  • Custom User Avatar

    But still of by one sometimes in the random tests... :/

    It's seems I bumped into the same issue. I pass all the test except 2-3 random tests when the result is different by 1.
    Two different solutions. But probably I implement the same bug twice. BTW, with the map you posted above. I think I don't understand the shooting timing properly or... I don't know(. And can't find the clue in the instructions and comments.
    Could you recall the kata and give me some hint? Though 7 years have passed:(((

  • Custom User Avatar

    "even if the targeted enemy has been killed by a previous (in the alphabetic order) turret, the shot is counted"
    Don't understand( Could you clarify please?

  • Custom User Avatar

    There must be some bug in your solution. I just passed all the Example tests, all Fixed and 98 out of 100 Random tests. Need to find my own bug as well :)

  • Custom User Avatar

    "The aliens that survive are the alien at wave[7] with an ending health of 2
    and the alien at wave[8] with an ending health of 8." - typo in Instructions (Test Example section). Wave[8]'s health can't be 8 since it's 0 from the start. And the same is applicable to "example_solutions = [[10,[7,2],[8,8]]..." in Sample Tests section. As for wave[7] then it's also not valid. According to my solution it has to be wave[9] and wave[10] respectively. On the other hand it still accepted because their sum is 10.

  • Custom User Avatar
  • Custom User Avatar

    Thank you for the clarification! Done

  • Loading more items...