• Custom User Avatar
  • Default User Avatar

    Certain issues with JavaScript autotest. Without changing the code, the tests passed on the third attempt..

  • Custom User Avatar

    approved

  • Custom User Avatar

    Go translation (author is inactive).

  • Custom User Avatar

    The test is ok. The only number of a that's in b is -15.

  • Default User Avatar

    @Python
    There is some issue with auto tests.

    a: [-16, -1, 11, 14, -5, -15]
    b: [-6, -19, -18, -2, -12, -19, -15, 1, 7, -19, 17]
    auto-test expected: [-16, -1, 11, 14, -5] NOT CORRECT

    Thanks a lot.

  • Custom User Avatar

    The problem is you are modifying aat the same time you are iterating on it. This is something you should avoid since it can lead to weird / unexpected results. One solution could be to iterate over a copy of a (while still modifying a) or to work with indices Look at the other submitted solutions to see other ideas of code working here.

    For example, if you add print(item) at the entry of you first loop, you will see that on fixed test #6 the 2 is never parsed.

  • Custom User Avatar

    I did the same thing

  • Custom User Avatar

    Can anyonw tell me why my code only works when i have both for loops, and not just the first one (for item in a:)?

  • Custom User Avatar

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

  • Custom User Avatar

    Your code not working is not an issue: https://docs.codewars.com/training/troubleshooting/

  • Default User Avatar

    a was [1,2,2], b was [1]: expected [] to deeply equal [ 2, 2 ]

    Physically can't complete this kata because of this.

  • Default User Avatar

    Ohh sorry, I am new to this platform. I Joined today hence i don't know much about the platform.By the way, thanks for the info.

  • Custom User Avatar

    Don't post solution in Discourse. The solutions need to be submitted in the trainer and then they appear in the Solutions page, that's enough. Also please use a spoiler flag as soon as you post code somewhere, so that users who didn't solve the kata cannot see it (I put the flag for you this time).

  • Default User Avatar

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

  • Loading more items...