Ad
  • Custom User Avatar

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

  • Custom User Avatar

    isn`t the complexity just N? why n^2?

  • 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

    This would not break anything. The other languages don't test it, but they should. It's just that it's better to state clearly in the description whether the check must be case sensitive or not. I'm inclined to think it should not.

  • 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

    I can update the description if needed. In fact, anyone with a certain amount of points (I don't know how many) can do it, can do many things actually. Do you think adding tests with uppercase letters would be sufficient? Now that I am thinking it, it's not clear whether ABA and aba should be considered as anagrams or not, I believe in general they should, I didn't think of it when I wrote the translation, so your initial approach might be better.

  • 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

    Please state the language when you raise an issue. This is due to the lack of random tests, there is already an issue raised about that.

  • Custom User Avatar

    Hi. I'm the author of Rust translation. I don't know what should be done. The problem is that most languages don't contain random tests and test only a few lowercase words. The description doesn't specify anything.

  • Custom User Avatar
  • Custom User Avatar

    Which language?

  • 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.