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

PROGRAMMING:Bubble sort exercise

Luz5年前 (2021-05-10)题库479
Enter n data. Using bubble sort programming (first row the maximum value), output the k-th round of sorting after the sequence.
###Input format:
Output the sequence result after the k-th round of sorting (1 space between data, no extra space at the end).
###Output format:
Please describe the output format here. For example, for each group of inputs, output the value of a + B in one line.
###Input example:
```in
6 3
3 5 1 2 8 6
4 3
9 8 7 6
5 0
4 3 2 9 7
```
###Output example:
```out
1 2 3 5 6 8
6 7 8 9
4 3 2 9 7
```







answer:If there is no answer, please comment