Ad
  • Default User Avatar

    How does this handle characters that are <16 in ASCII? Thinking about situations like "\u0008\u0014" = "8e0000" instead of "080e00"

  • Default User Avatar

    Thanks for reporting. It's fixed. Regards, suic

  • Default User Avatar

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

  • Custom User Avatar

    Yup! Definitely wasted some time trying to get the general JS solution working

  • Default User Avatar

    I would recommend taking the Distinct subset before sorting with OrderBy.

    Consider a case where s1 + s2 is very long (millions of characters), however once you have selected only distinct characters, there will be only 26 at most, with this subset, and often less. It is more efficient to sort a string of 1 to 26 characters than a string of 1 to a very large number of characters.

  • Default User Avatar

    The description should specify that the numbers are non-negative integers. The solution to handle floating point and signed integer numbers is more complex, and not covered in the test cases.