Write a procedure
void (vector<double>& v, int m);
that recursively sorts @v[0..m]@ in non-decreasing order using the selection sort algorithm. The rest of @v@ must not be modified.
| C++ | |
| C | |
| Java | |
| Python | |
|
@m@ @v.size()@.
The function @position_maximum()@ of the exercise problem://problemsjutge.org:problems/p1/roura/posicio-maxim.pbm should be useful.
You only need to submit the required procedure; your main program will be ignored.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T11:54:28.909Z
© Jutge.org, 2006–2026.
https://jutge.org