- 博客(3)
- 收藏
- 关注
转载 fastDB使用过程中遇到的几个问题
1、编译fastDB Linux下运行程序提示: Incompatibility between headers and library fastdb会假设绝大多数的Linux版是64-bit,如果你的机子是32-bit的,必须将config.h文件的如下内容注释掉: // #if !defined(_WIN32) || defined(_WIN64) // most unixes are
2014-10-29 10:01:50
2136
原创 希尔排序算法的实现
该算法是直接插入排序的改进,又称为“缩小增量法排序”,将原序列按间隔值分成若干组,然后对各组进行排序。间隔值取d1=[n/2],d(i +1)= [di/2],各组内的排序实际上等价于冒泡排序。希尔排序时间复杂度是nlog2n,非稳定性。 template void shell_sort(T table[], int n) { T temp; bool flag; int i,
2012-03-08 20:34:35
441
原创 快速排序算法的递归实现
该算法的平均时间复杂度为nlog2n,空间复杂度为log2n,是一个不稳定的算法,一般排序元素个数在20个以上选择此算法为佳。 template void quick_sort(T table[MAX], int low, int high) { int i,j,temp; int L_low,L_high,R_low,R_high; i = low; j = high;
2012-03-06 17:55:10
411
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅