数组-排序
冒泡排序
package homework10;
import java.util.Arrays;
public class paixu {
public static void main(String[] args) {
int[] arr = new int[]{2,101,6,1,50,3,7,6,4,100,30,5,7,0,};
//冒泡排序,比相邻的元素
for(int i = 0;i<arr.length-1;i++){
原创
2022-03-19 18:19:49 ·
228 阅读 ·
0 评论