![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
qq_35751236
这个作者很懒,什么都没留下…
展开
-
二分查找
#include<iostream> using namespace std;//非递归 int binarySearch(int *a, int len, int goal) { int low = 0; int high = len - 1; while (low<=high){ int middle = low + (high - low) / 2;原创 2017-04-25 22:16:33 · 189 阅读 · 0 评论 -
快速排序
#include <iostream> using namespace std; int Partition(int *data, int length, int start, int end); int Partition2(int *data, int length, int start, int end);void quickSort(int *data, int length, int st原创 2017-04-26 13:48:25 · 133 阅读 · 0 评论 -
奇偶排序
#include <iostream> #include <vector> using namespace std; void reOrderEvenOdd(vector<int> &array, int begin, int end){ if (!array.size()) return; if ((end - begin) <= 0) return原创 2017-04-27 13:46:25 · 279 阅读 · 0 评论