• Moved tests use statements to tests module. In the unlikely event of a user solution using rand::thread_rng or rand::seq::SliceRandom there will not be a double import with this change.

  • for Rust,

    Description says that the input will only contain /[a-zA-Z0-9]/, however in the random test we generate random unicode characters. By writing println!("{}", text); to the start of your solution, you will see that the random tests generate emojis, chinese symbols and stuff that the console will print as blocks.

  • in test_codewarsisawersome we get string "CODEwarsIsAWesOmE" and expect there to be 5 duplicates.

    My counts are:

    no duplicates: cdrim      
    duplicates:    oewas           <- count of 5
    

    By this manual counting method I actually got 5 duplicates, just as the test expects.

    Maybe I counted wrong or misunderstood the issue. If that was the case, please ignore this comment.

  • I made a C# solution that throws an ArgumentException when the town has a zero. The solution passes sample tests and actual tests.

    I'm fairly confindent that in C# the town has no zeroes.

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

  • That does make more sense.

    Some other languages (e.g. python, cpp, js) do allow index1 to be higher. Perhaps that inconsistency has nothing to do with the quoted snippet of description.

  • For Go

    the description reads:

    For the purposes of this kata, some tests may have multiple answers; any valid solutions will be accepted.

    However, both actual and sample tests expect two_sum([1,2,3], 4)) to equal [0,2]. [2,0] is a valid solution for the inputs, but it fails the tests.

  • For python

    description reads:

    The indices of these items should then be returned in a tuple

    However, the tests are expecting me to return a list [a, b] and not a tuple (a, b).

  • I don't think the Kata solver has to deal with test generated warnings in any manner at all, simply ignore them.

    You can pass the Kata while having warnings.

  • PLEASE DON'T APPROVE

    This forks adds some of the language descriptions, I don't know the missing languages.

  • DO NOT APPROVE

    Changes things in description

    TODO: insert all languages as examples

  • Honestly the whole description needs a little bit of massaging. It used to say returns array, but now it says returns tuple. Since the description last changed from wanting an array to wanting a tuple, the description is not correct for e.g. python.

    It used to have the example snippet in one syntax and one syntax only. Now it has two languages specified despite many languages supprted. It will show hs for all others than elixir.

  • I recieved a comment:

    Both input tuple items and output are numbers of days, so I'd expect them to have the same type...

    I agree with the comment. This fork attempts to address this issue but using u32 for the tuple and the output.

  • Tests from js, might need more tests for edge cases before approval.

    A better random maze generator might be possible. Still, the present one does give both false and true results.

  • Loading more items...