Ad
  • Default User Avatar

    Lots of people, including the kata author, believe that this kata is comparing the number of mating pairs to x. The python tests are looking for the total number of bears. This exception should be explicitly stated in the kata instructions, or the python tests should be fixed to reflect the author's intentions.

  • Default User Avatar

    At some point (probably when the kata was modified to conform to PEP-8), the input data on Python 3.8 was changed from lists within lists to tuples. This means none of the upvoted solutions work as-written anymore.

    This is still probably a 7 kyu since the problem can be fixed within the solution, but the instructions are no longer accurate.

  • Default User Avatar

    This algorithm already does end if the string starts with ')'. An odd number of characters can be a valid string since the string includes characters that we don't pay attention to.

  • Default User Avatar

    One thing that caught me off guard with this kata is that I came under the impression that the pauses might not be uniform with the '.'s if done by an unskilled operator. So 111000111 is 'I' (two dots), but 11111100111111 is 'M' (two dashes).

    The thing that is still throwing me off, though, is that 10001 is meant to map to 'EE', so it appears like the test cases allow the pauses to be longer than the dots but not vice versa?

  • Custom User Avatar

    There is a sample how it's processed. It should be enough to figure it out ;P

  • Default User Avatar

    It's not clear in the instructions, though the author confirms in another nested comment in here, but each reinforcement letter needs to be used in order. So if you have reinforcements 'aaaaa' and 'bbbbb', the 'a's have to reinforce every position on the battlefield before a 'b' can fill that position.

    Do not make the same mistake I made in thinking that the other 'a's in the reserves would all go home if they weren't called on.

  • Default User Avatar

    Can you source this? I looked this up on the GeeksforGeeks site, and their solution is completely different.