selectSort
来源:互联网 发布:cpda数据分析师 假 编辑:程序博客网 时间:2024/05/29 03:11
publicstaticvoidselectSort(int[]a){
intminIndex=0;
inttemp=0;
if((a==null)||(a.length==0)) { return; }
for(inti=0;i<a.length-1;i++){
minIndex=i;
for(intj=i+1;j<a.length;j++){
if(a[j]<a[minIndex]){
minIndex=j;
}
}
if(minIndex!=i) {
temp=a[i];
a[i]=a[minIndex];
a[minIndex]=temp;
}
}
0 0
- SelectSort
- selectsort
- selectsort
- selectsort
- selectSort
- SelectSort
- selectSort
- SelectSort
- insertsort & selectsort
- BubbleSort and SelectSort
- 选择排序:selectSort
- selectSort - 选择排序
- SelectSort,选择排序
- 选择排序SelectSort
- 选择排序-selectSort
- 选择排序--SelectSort
- 排序--SelectSort优化
- 选择排序-selectsort
- oracle rac启用归档模式
- java格式化数字DecimalFormat
- JQuery(入门一)
- gcc编译工具生成动态库和静态库之三----问题及重要知识点分析
- Eclipse出现Failed to load the JNI shared library jvm.dll错误的解决办法
- selectSort
- 个人借鉴网上爬虫代码改写的py
- 查看当前网站的cookie快捷方法
- ActiveMQ发布订阅模式
- MySQL的if,case语句使用总结
- Python 实例方法、@staticmethod和@classmethod
- jaxb的介绍,以及对jaxb的入门
- iOS 定位一闪而过bug
- 不忘初心,方得始终