Selection Sort
Submit solution
C, C++, Python3
Points:
2
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
This problem will require you to programme a sorting algorithm. The selection sort algorithm we discussed in class would do.
Input Specification
The first line will contain a single integer \(N\) (\(1 < N < 1000\)), indicating elements in the array.
The following \(N\) lines will each contain a single integer.
Output Specification
Output a single line with all elements inside the array in ascending order, separated by space.
Sample Input
5
10
50
20
70
15
Sample Output
10 15 20 50 70
Comments