Ad
  • Default User Avatar

    Good call. I corrected it. Should be fine now.

  • Default User Avatar

    Thanks. I added test as suggested by @myjinxin. I wasn't sure how to make Codewars time out as @kazk said. I run ir few times, and I think I found a time limit that should work for some obvious mistakes.
    I will be happy for more feedback on it.

  • Default User Avatar

    I actually not sure how to test for time complexity. I read the documentation on Test, but couldn't find any reference to it. I would really appreciate help with it.

    One could be tempted solve the problem by interagating through each time when the kids play, and fill the whole array with max. That would make it O(N*M). But it can be done O(N+M).

  • Default User Avatar

    Thanks. Sorry for the spell check.... and also for making it clearer.

  • Default User Avatar

    Hello everyone, Is there a way to write test that check time complexity of a code? I just wrote a kata, and would like to test for it. Thanks for the help.