Variation of the classic radix sort algorithm
Array = []
sortArray(Array)
to sort array in time complexity O(kn) where k = number of digits in largest number.
Array = [-470,1911,120,-314,-4,1871,1749,1588,195,1097]
print(sortArray(Array))
returns [-470, -314, -4, 120, 195, 1097, 1588, 1749, 1871, 191]
sorting the array digit-wise.
Python