246. Sort Them
Print n integers in non-decreasing order.
Write bubble sort first if you have never written one. Then look at the
constraint: n reaches 200000, and bubble sort compares every pair, which is
about twenty billion comparisons. The largest test is sized so it will not
finish.
Use your language's sort, which is O(n log n). The point of this problem is
to feel the difference between the two rather than to learn a new algorithm.
Constraints - `1 ≤ n ≤ 200000` - `-1000000000 ≤ a[i] ≤ 1000000000`
Input
The first line contains an integer n.
The second line contains n integers.
Output
Print the n values in non-decreasing order, separated by single spaces.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.