Ad
  • Custom User Avatar

    alr raised as issue

  • Custom User Avatar

    Agreed. These tests are very brittle.

  • Custom User Avatar

    Thinking of a good algorithm does not depend on the language you implement it in. If you can come up with a good algorithm, you can implement it in any language you like ;-)

  • Custom User Avatar

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

  • Custom User Avatar

    As usual, rule 0 of algorithm katas: don't micro-optimize an algorithm with the wrong complexity ;-)

    The input range should give you a good idea what the requred complexity is like.

  • Custom User Avatar

    You are mutating the input array: you can see it here
    myNames = names doesn't make a copy of it. Try googling how to make a copy so you can work with it without mutating the input array or build a new one and work with that.

  • Custom User Avatar

    Post your code then, mark the post as having spoiler content. The tests aren't random in Python, I've tried my code and worked and 1333 other warriors passed, so I doubt the kata is at fault here.

  • Custom User Avatar

    Are you mutating the list/array? It's not true there are a lot of Penny in the original list (the list is constant in all tests unlike another languages), only one and if r is 2, the second person to drink a cola is Leonard. Not a kata issue.