Write a procedure that, supposing that all the positions of @v@, except maybe the last one, are in non-decreasing order, leaves @v@ totally in non-decreasing order.
For instance, if @v@ is , it must become .
| C++ | |
| C | |
| Java | |
| Python | |
| MyPy | |
We have . Moreover, the positions 0 to of @v@ are in non-decreasing order.
You only need to submit the required procedure; your main program will be ignored.