数据结构
来源:互联网 发布:java类的定义格式 编辑:程序博客网 时间:2024/06/01 22:12
一.java常见算法
快速排序
public void sort(int arr[],int low,int high){
int l=low;
int h=high;
int povit=arr[low];
while(l<h){
while(l<h&&arr[h]>povit){
h--;
}
if(l<h){
int temp=arr[l];
arr[l]=arr[h];
arr[h]=temp;
l++;
}
while(l<h&&arr[l]<povit){
l++;
}
if(l<h){
int tem=arr[l];
arr[l]=arr[h];
arr[h]=tem;
h--;
}
}
if(l>low)
sort(arr, low, l-1);
if(h<high)
sort(arr, l+1, high);
}
哈希算法
阅读全文
0 0
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- 数据结构
- js实现进制之间的转换
- Unity 球体旋转 到固定位置
- codeforces 116A(Tram) Java
- 【性能分析】UMDH分析内存泄露
- Contest_6 0619 By lhq
- 数据结构
- [bzoj1202] 狡猾的商人
- MFC消息映射-小白理解(4)
- 解析oracle的rownum
- 51nod1667 概率好题
- Oracle 生成流水号 存储过程 订单编号
- ListView多条目加载
- 将二维数组用foreach遍历并以表格的形式输出
- LeetCode (1)