Given a set of 10 random positive integers (in range 1-100), write a code to concatenate the integers in such a way that the concatenation of the numbers gives the smallest possible integer.
Show us original list of integers and smallest number.
List: 78, 52, 5, 98, 42, 21, 9, 67, 18, 6
Smallest number :
The sorting algorithm is a bit tricky.
I hope, that my easy key is correct:
The key is either the number, if it is 2-digit, otherwise 11*number
31 -> 31
36 -> 36
3 -> 33
and the number is 31336.
with that python takes it easy and @VcC will have no prob with a oneliner (-;