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.