Ad
  • Default User Avatar

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

  • Default User Avatar

    Translated from C#. I'm new to F# so careful review recommended.

  • Default User Avatar

    F# description tells to return Nothing if conversion is not possible. For F# it should read None instead of Nothing.

  • Default User Avatar

    F# description talks about arrays, but tests expect a list.

  • Default User Avatar

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

  • Default User Avatar

    Compared to other solutions here mine is overly verbose and has an unnecessary Seq conversion when Array.map exists.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

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

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

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

  • Default User Avatar

    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.

  • Loading more items...