SORT_PROBLEM_A(A, n)
let B[1..n] be a new array
for i = 1 to n
make B[i] an empty list
for i = 1 to A.length
j = 1
while A[i]/10
j = j + 1
insert A[i] into list B[j]
for i = 1 to n
//sort B[j] with RADIX-SORT
RADIX-SORT(B[j], j)
concatenate the lists B[0..n] together in order