Ad
  • Custom User Avatar

    The constraints were meant to limit the space complexity to constant which is definitely useful in memory-constrained platforms such as embeded systems or even in a large scale data streaming application which can't store everything in the memory.

  • Custom User Avatar

    Either your algorithm is inefficient (I haven't done Ruby version but I assume that it requires a linear solution), or you're running into an infinite loop.

  • Custom User Avatar
  • Custom User Avatar

    Just don't get into the infinite loop (it's not really mathematic as well).

    You can solve this very easily if you pay close attention... Now it's your turn to think ;)

  • Custom User Avatar

    Your code has 2 problem:

    1. You must define function named '', your code doesn't do that, it defined function with single argument called ''.
    2. You are missing some * operators (multiplication) - but this is problably result of markdown parser.

    Good luck

  • Custom User Avatar

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

  • Custom User Avatar

    It is hard to say, please post your source code in replay.

  • Custom User Avatar

    No issue here, you're facing EXACTLY the goal of the kata. ;)

    Pursuie your researches about that and keep in mind the title: ... (and why your code fails in some katas)

  • Custom User Avatar

    Results are case-insensitive; "DDD" is the same as "DdD" is the same as "ddd". So, 7 e's, four ddd's, three aa's.

  • Custom User Avatar

    I would have accepted your complain if the simple solution had been the only way to solve it. And you saw the note in beginning to inform you that it is going to be more difficult than 8 kyu normal kata.

  • Custom User Avatar

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

  • Custom User Avatar

    Yes. :)
    It's called a "ternary operator" if you want to look up more information about it.

  • Custom User Avatar

    Haha, nice.
    I guess you can try solve it again :)
    I'm gonna put my previous comment in spoilers then so other ppl can't see it.

    However, it seems like you have nested while loops, which seems like it would be O(n^2) complexity, but you need O(n) to pass the tests.
    If you need any more help, you can just post your code in spoilers.

  • Custom User Avatar

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

  • Custom User Avatar

    Seems the subpattern there is 123a repeated 3 times and shuffled. Not an issue, use question instead.

  • Loading more items...