I tried this and came up with a one-liner that seems to do it. It sorts the
array and prints the result.
But, if I post it, will it be useful? You will learn more by doing it
yourself.
Your choice.


Harry