Ad
  • Custom User Avatar

    I misunderstood. But I think the explanation should be written more clearly.

  • Custom User Avatar

    [C++14] Quote from instructions:
    """
    Example:
    "56 65 74 100 99 68 86 180 90" ordered by numbers weights becomes: "100 180 90 56 65 74 68 86 99"

    When two numbers have the same "weight", let us class them as if they were strings and not numbers: 100 is before 180
    because its "weight" (1) is less than the one of 180 (9) AND 180 IS BEFORE 90 SINCE, HAVING THE SAME "WEIGHT" (9), IT COMES BEFORE AS A STRING.
    """

    sample test input:
    "2000 10003 1234000 44444444 9999 11 11 22 123"

    expected:
    "11 11 2000 10003 22 123 1234000 44444444 9999"

    How the 11 can be expected to come before 2000. As stated in the instructions, the order of values with the same weight should be the same as the order in the input.

  • Custom User Avatar

    May be need to review for random test in C language.

    Each time when I test it, the expected value is less than one or two from the actual value. May be the test rounds a number down side but instructions want to round nearest whole number.