Ad
  • Custom User Avatar

    But the kata says the fighters array will always be the same, so there is no need to support possible addition of new fighters to the fighters array.

  • Custom User Avatar

    only one of the test cases needs a value of true, and it's literally the example test case, too. very easy to hardcode. add the big rando test

  • Custom User Avatar

    Took me some time to figure this out. I stepped away for a bit, came back, and figured it out pretty quickly. I could see this being incredibly hard or incredibly easy depending on your mindset.

  • Custom User Avatar

    I do agree the directions are a bit lacking and you kind have to figure out a lot of the requirements yourself. (Replacing _ with spaces for example).

    However, as someone who is trying to improve with regex, this actually helped me learn a lot. So I'm kind of glad the instructions were a little parse.

  • Custom User Avatar

    Lol. I love this for obvious reasons, despite it being a terrible and broken solution.

  • Custom User Avatar

    Took me awhile to understand exactly what it was asking for. I assumed that it meant the order should be based off of when the numbers appear in the string.

    So 2000 11 11 02 would return as 2000 11 11 02

    But it's actually asking you to sort any equal numbers as if they were a string. So you need to compare them alphabetically to figure out the correct order.

  • Custom User Avatar

    Clean solution, but I would swap the 5 out for (fighters[position[0]].length - 1) to support if new fighters are ever added to the roster.