Read an array of integers and print them sorted in ascending order, space-separated.
Input / Output
Input: first line is N, second line has N space-separated integers. Output: the same N integers, sorted ascending, space-separated on one line.
Examples
Input
5 5 2 4 1 3
Expected Output
1 2 3 4 5
Input
4 9 1 8 2
Expected Output
1 2 8 9
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.