选择排序
2021-07-13 07:06
标签:static str array node void package tar public i+1 package com.bjpowernode.t01; /* public static void main(String[] args) { //外层 //里层 } for(int i=0; i } } 选择排序 标签:static str array node void package tar public i+1 原文地址:https://www.cnblogs.com/Koma-vv/p/9543700.html
* 选择排序
*/
public class TestArray10 {
int[] a = {4,2,7,3,6};
for(int i=0; i
for(int j=i+1; j
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
}