Read an array and print it sorted from largest to smallest, using selection sort.
Input / Output
Input: first line N, second line N space-separated integers. Output: the same integers sorted descending, space-separated.
Examples
Input
5 5 2 4 1 3
Expected Output
5 4 3 2 1
Input
4 9 1 8 2
Expected Output
9 8 2 1
+ 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.