shell排序
来源:互联网 发布:老子化胡 知乎 编辑:程序博客网 时间:2024/06/16 20:27
希尔排序
public Class Shell{ int i, j, temp; int increasement = a.length; do{ increasement = increasement /3 + 1; for(i = increasement; i < a.length; i++){ if(a[i] < a[i - increasement]){ temp = a[i]; for(j = i - increasement; j >=0 && a[j] > temp; j-=increasement){//升序 a[j+increasement]=a[j]; } a[j+increasement] = temp; } } }while(increasement > 1);}
0 0
- shell排序
- shell排序
- SHELL排序
- Shell排序
- shell排序
- shell排序
- Shell 排序
- Shell排序
- Shell排序
- Shell排序
- shell 排序
- shell排序
- shell排序
- Shell排序
- Shell排序
- Shell排序
- Shell排序
- shell排序
- 自定义的DataPicker和TimePicker(日期选择器和时间选择器)
- 从递归计算到线性计算:C(N)=(2/N)*∑(i: 0->N-1) C(i)+N
- 一文读懂卷积神经网络
- EditText属性大全
- 在Service的内部定义一个start()方法,简化Client端的调用
- shell排序
- CSS3使用边框和背景
- eclipse maven plugin 插件 离线安装 和 配置
- Spring源码下载
- hbase regionserver总出现自动down的情况排查
- Kafka笔记
- iOS 连个应用之间的跳转
- linux启动环境变量配置文件加载图例
- 使用gradle来编译生成apk