in reply to Re: sorting number
in thread sorting number

My guess is that it was the CORE8 that was misplaced, and GrandFather's and Tux's solutions are the expected output.

I suppose you meant to write <=> on the right side? Otherwise your code gives the same output as a plain sort

Replies are listed 'Best First'.
Re^3: sorting number
by kcott (Archbishop) on Apr 09, 2019 at 08:24 UTC
    "My guess is that it was the CORE8 that was misplaced, ..."

    Quite possibly - it's all guesswork. :-)

    "I suppose you meant to write <=> on the right side?"

    No, cmp was intended. I was aiming to indicate that cmp would give "11 115 12 130"; whereas <=> would give "11 12 115 130".

    It would appear I failed to communicate my intent. Thanks for pointing this out and giving me the opportunity to provide clarification.

    — Ken