Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Just thinking that "loop the same long string 26 times" already is O(n).

  • Custom User Avatar

    Not sure if I agree. The case satement referencing each index in each when is much more readable and more immediately understandable.

  • Custom User Avatar

    Beautiful! It's calling 'placeholder'?

  • Custom User Avatar

    Yeah absolutely sexy, this also prevents nasty user input because it enforces the use of a certain datatype. Thanks for the upload!

  • Custom User Avatar

    This is just beautiful to look at. My personal favourite!

  • Custom User Avatar

    Cool, thanks!

  • Custom User Avatar

    the language versions are inconsistent with each other

    Yes. I let the kata as it is...

  • Custom User Avatar

    Well, either way the language versions are inconsistent with each other, so you'll have to decide whether to enforce it or not.

  • Custom User Avatar

    It's kind of a work but if you read at the very bottom of the page you will find a post by @ZozoFouchtra who made the JS translation:

    I think initial kata assumed a1 contains unique search strings. 
    That's why author of the kata didn't initialy test the ["arp", "arp"] case.
    
    One of the translators added this constraint (checking a1).
    Does this mean all previous translations should be now modified and several passed solutions invalidated ?
    

    This is why this is not tested (the constraint was added from the HS translation).

  • Custom User Avatar

    Beware: r must be without duplicates.

    At least in JS this is not tested and even the reference solution does not handle them correctly.

  • Custom User Avatar

    I will look at it but it is a suggestion, not an issue.

  • Custom User Avatar

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

  • Custom User Avatar

    What is the result of solution("foo#bar", ["#"]) supposed to be?
    I would expect that it should be "foo".

    But there are solutions of the kata, where the result is "foo#bar",
    so a test might be missing to enforce this.

  • Custom User Avatar

    The final tests dont catch it if you forget to implement zero.

  • Loading more items...