Ad
  • Default User Avatar

    Hi, there's some inconsistency in random tests. I got this message:

    buses(0, 8, 2): 4 should equal 0

    But you get more fails after changing the solution to return 0 when there are no kids:

    buses(0, 46, 17): 0 should equal 3

    buses(0, 33, 5): 0 should equal 7

  • Default User Avatar

    Wow, I really underestimated that kata. I was even halfway, but unfortunately abandoned the right way of thinking. Thanks for explaining that.

  • Default User Avatar

    You should check your test cases. I seem to fail every time the input consists of 4 or more numbers, so let's consider this one [100, 14, 3, 4]

    At most 2 warriors can travel at once. The fastest warrior travels for 3 minutes, so he's carrying the lamp.

    • First round (100 and 3) = 100
    • 3 goes back
    • Second round (14 and 3) = 14
    • 3 goes back
    • Third round (4 and 3) = 4

    This gives 100+3+14+3+4 = 124, but kata expects 115.

    For larger inputs the required result is almost a half of what I get

  • Default User Avatar

    Hey, you are able to go back to your previously attempted katas through your profile. Just hover over your avatar or ranking graph in the upper-right corner and select "View Profile" and then go to "Solutions" tab. You will be able to see all your solutions there - even if they're not completed.

    There is also more user-friendly solution if you know that you have to go but want to return to that kata. Simply click a start sign below the name of your current kata. You can then access it by hovering your mouse over a graph with a star in top-right corner.

    Have fun coding!