Ad
  • Custom User Avatar

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

  • Custom User Avatar

    This solution is very simple but it's also n^2 complexity, you can do better :)

  • Custom User Avatar

    I think that just adding uppercase examples in sample tests is quite enough.
    Correct me if I'm wrong but modifying the description would do so for all of the other languages, right?
    We could "break" the kata for other languages this way.

    So I'd go with either sample tests or changing the random tests so they use lower case only.

    For backwards compatibility's sake, the sample tests option seems the least intrusive.

  • Custom User Avatar

    Hey akar-0,
    thank you for replying!
    I'm fairly new to Codewars and I don't know how authoring and translating Katas work yet, so I'm sorry if I make little sense.

    I assume that you have no influence over the Kata's description.
    What about the tests? you said they are random but would it be possible to limit them to lowercase only? Since most other languages don't even offer any other testing than the samples, which only use lowercase letters...

    If above can't be done, would it be possible to add at least one uppercase case to the Rust samples?

    Thanks!

  • Custom User Avatar
  • Custom User Avatar

    The description makes no mention of upper/lower case.

    Turns out that "g" and "G" are treated as if they were completely different letters - and no case like this is covered in sample_tests, which is a shame.

  • Custom User Avatar

    T doesn't implement Copy but Vec implements IntoIterator, which means you can call into_iter() and get T. (instead of &T that you get from iter() that you can't collect() )

    I had to look at the solutions to notice usage of into_iter() and google the difference between it and iter() I was used to.
    Not an obvious thing if you're new to the language like I am.