随笔分类 - 数据结构和算法(C++版)
摘要:#ifndef _FIND_H_ #define _FIND_H_ //如果找到了就返回找到的数据的下标,找不到就返回b-1 template int find_half(const T* p, //待查找的数组 int b, //起始位置 int e, //终止位置 T data, //要查找的数据 ...
阅读全文
摘要:#ifndef _SORT_H_ #define _SORT_H_ template void sort_bubble(T* p, int b, int e) { //for (int j = 0; j 0; --i) //{ // for (int j = 0; j 0; --i) { for (int j = 0; j voi...
阅读全文

浙公网安备 33010602011771号