Problem

1 /10


Count sort

Theory Click to read/hide

Error

Problem

Implement a counting sort algorithm for arbitrary numbers up to 10000 in absolute value.
 
Input
The input to the program is first the value n <= 100000 – the number of array elements. The next line contains the – integers, modulo not exceeding 10000.
 
Output
Display the array sorted in non-descending order.
 
Examples
# Input Output
1
5
1 3 4 2 5
1 2 3 4 5