Write a procedure that sorts @v@ in non-decreasing order using the
insertion sort algorithm.
Interface
C++
void insertion_sort(vector<double>& v);
C
void insertion_sort(int n,double v[n]);
Java
publicstaticvoidinsertionSort(double[] v);
Python
insertion_sort(v) # returns None
MyPy
insertion_sort(v: list[float]) ->None
Observation
You only need to submit the required procedure; your main program
will be ignored.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.