Ad
  • Custom User Avatar

    I've wasted 30 minutes trying to figure out why my sort was incorrect. Clarification using codepoint is not great, I think it's better to be explicit about number and symbols being a part of sorting. Depending on your implementation, you might get it right straight away or not. As my numbers and strings were separate, I was sorting only on the strings, hence error in sorting. Please make the description clearer!

  • Custom User Avatar

    Still unclear. Was about to start an issue for this...

    It is not clear that the key 1,2,= should be included in the sort.

    In the result, substrings will be in decreasing order of their length and when they have the same length sorted alphabetically (more precisely sorted by codepoint)

    I interpreted substring as the repeated chars and not the key or : instead of both key and count. The numbered list is still the most clear and concise.

    The order determined by

    1. Frequency
    2. Prefix ("1" > "2" > "=")
    3. Character alphabatically
  • Custom User Avatar

    I deserve the +1:-) since I changed the description with "codepoint". Thanks for your post!

  • Default User Avatar

    +1 for changing the description to something like this.

    Alternatively, instead of saying "when they have the same length sorted alphabetically", you could say "when they have the same length sorted by codepoint" to make it clear you're including the prefixes, not just the letters, in what constitutes a "substring."

  • Custom User Avatar

    It think it is a stretch to say that the examples make it clear. The third example checks for it, in one place.

    If you want to actually make it clear, in the description write something like:

    The order determined by

    1. Frequency
    2. Prefix ("1" > "2" > "=")
    3. Character alphabatically
  • Custom User Avatar

    It seems a little weird that the sort order includes the '1' '2' or '=' prefix

    Maybe a little weird but the rules are the rules, aren't they?-) We must know, when reading the results, which string is preponderant and the examples make that clear. Anyway maybe you have a better proposition for the description?