Ad
  • Custom User Avatar

    ok

  • Custom User Avatar

    The C# translation did not take into account the difference between C#'s '/' and JS's '/', which I have fixed and now waiting to approve. @dfhwze

  • Custom User Avatar
  • Custom User Avatar

    Boxing won't occur here.

    char.IsUpper takes a char and returns a bool.

    bool (or System.Boolean) has a Equals(bool) override, so the compiler won't choose the Object.Equals(Object) method.

    Using == is still better practice, though, as

    1. it's more idiomatic; and
    2. it avoids having to perform a method call (Equals), though the I'm nearly positive bool.Equals(bool) would be inlined
  • Custom User Avatar

    Coding in C# is like coding a suit, everything looks neat and tidy if you follow the conventions and standards. Otherwise your code will look like a fat cat.

  • Custom User Avatar

    Completely agree, spent most of my time on this Kata figuring out all the sorting requirements that were not explained at all properly (at least for me).

  • Custom User Avatar

    added

  • Custom User Avatar

    No suggestion, closing.

  • Custom User Avatar

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

  • Custom User Avatar

    You doesn't understand the point that when u are solving this problem prefix and letters are two different part in the process.
    When you read substring sorted by len + ascending lexicographic order, ur brain think automatically this is for the second part of the string, the letters, like "aaa" in your example.

    At the end the two description mean the same but one is much more clearer and faster to understand, there is already a 40 upvoted comment 5 years ago from helloRupa wich had rewritten all the description of this kata.

    And fun fact by watching all the comment I have seen the same answer of you 4 years ago to the same type of comment.

  • Custom User Avatar

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

  • Custom User Avatar

    Just looking at the comment everyone is complaining at the sorting thing, it should be said more clearly like:

    1.Length

    2.Prefix of string i.e 1, 2, =

    3.Lexicographic



    Everyone is missing the same second step, understanding the description should not be the hardest part of the problem but it's clearly the case here.

  • Custom User Avatar

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

  • Custom User Avatar

    what you suggest adding/editing?

  • Custom User Avatar

    You missed the space between words. See the examples in the description. Those brackets are added by JUnit to highlight where two strings are different.