摘要: #ifndef _FIND_H_ #define _FIND_H_ //如果找到了就返回找到的数据的下标,找不到就返回b-1 template int find_half(const T* p, //待查找的数组 int b, //起始位置 int e, //终止位置 T data, //要查找的数据 ... 阅读全文
posted @ 2018-03-06 21:06 Dean二十七 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #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... 阅读全文
posted @ 2018-03-06 21:05 Dean二十七 阅读(288) 评论(0) 推荐(0) 编辑