-->
当前位置:首页 > 题库

PROGRAMMING:Insertion sort

Luz5年前 (2021-05-10)题库422
Write a function to realize the insertion sort method to sort the array from small to large. In the main function, first input an integer n (1 < n < = 100), and then input n integers into the array, call the function you write to sort and output all the elements of the array( Please refer to relevant materials for the algorithm idea of insertion sort method.
###Input example:
```in
five
2 3 1 6 8
```
###Output example:
```out
1 2 3 6 8
```







answer:If there is no answer, please comment