Ad
  • Custom User Avatar

    I think it's not a bug rather than lack of proper documentation. (updated)
    But thanks for asking! :)

  • Custom User Avatar

    The original rules of calculating quipu is what I mentioned above. (I will update the description instead of the tests)
    Do you mind to change it according to that?

  • Custom User Avatar

    yes, @myjinxin2015, because of the rules mentioned above.
    It has no affect to your solution, because the expected quipu soution is the same. It's just matter of interpretation in the middle of the algorithm.

  • Custom User Avatar

    It is an interesting one! I have to say that myjinxin2015's answer ins't right..
    When I found out the kata I didin't thought about corner cases like this.. :)

    So the correct solution would be like this:
    ~ -> 0 or space

    between two 0-s you have to put a space but between a 0 and 1 for example you haven't.

    @~@ => 11
    @~~@ => 101
    @~~~@ => 1001
    @ ~     ~ ~     ~ @ => 1001 (!!)
    1 space 0 space 0 1
    

    I will add more test to validate this solution. :)

  • Custom User Avatar

    oh.. thanks, fixed!

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for the translation!

  • Custom User Avatar

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

  • Custom User Avatar

    OH.. so the reason I could't do that with your comment because you already did it? Obvious, ok :)

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Try now! I think I had connection issues and didn't update my code..

  • Custom User Avatar

    You're absolutely right, I fixed this bug! :) Thanks!