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 | public static void insertionSort(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.