Airport security officials have confiscated several items from passengers at the security checkpoint. All the items have been dumped into a huge box (represented as an array). Each item has a certain amount of risk, categorized as 0, 1, or 2. Your task is to sort the items based on their risk severity values, which range from 0 to 2.
Input:
7
[1, 0, 2, 0, 1, 0, 2]
Output:
0 0 0 1 1 2 2
Input:
5
[2, 1, 0, 1, 2]
Output:
0 1 1 2 2
Input:
3
[0, 0, 0]
Output:
0 0 0