Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    ofc, since it's not possible... x)
    the list is built first, then it's indexed

  • Custom User Avatar

    I think you are making things difficult for yourself by imagining rules that don't exist.

    e.g.

    Kata says:

    The terrain never starts or ends with a gap

    This means the ants can WALK in and WALK out of the terrain (avoiding complications of bridges with only one known end)

    It does NOT say there is some magic platform at the end with "solid ground with enough space for all ants".

    Kata says:

    What order do they exit on the right hand side?

    So you know they do not stand around mingling on some imagined platform having some kind of ant party. They EXIT.

  • Custom User Avatar

    Why is this an issue? Kata description already says:

    This process repeats ... until all the ants reach the right hand side.

    NOTE: all ants

    What part is not clear?

  • Custom User Avatar

    When you see solutions that may be incorrect but have passed test suite, it also means test suite is incomplete.
    In that case, don't hesitate to raise an issue to complete test suite.
    If test suite is complete, problem comes from your solution.

    Finally note that I didn't try to obfuscate code but to reduce its length ;-)

  • Custom User Avatar

    You're wrong.

  • Custom User Avatar

    If the final result is longer than 140 chars it must return false

    It's your solution that's wrong.

  • Custom User Avatar

    Arrays don't work like that in JavaScript. You can't simply set one equal to the other. I use arr = resArr.slice() for that purpose. I hope that helps!