c++数据结构
呱呱( O_o )
这个作者很懒,什么都没留下…
展开
-
c++快速排序
@快速排序快速排序void quickSort(int s[], int l, int r){ if (l< r) { int i = l, j = r, temp = s[l]; while (i < j) { while (i < j && s[j] >= temp) // 从右向左找第一个小于x的数 j--; ...原创 2019-08-10 19:05:58 · 446 阅读 · 1 评论 -
c++ 排序算法
#include<iostream>#include<algorithm>#include<vector>#define MAXSIZE 100;using namespace std;//时间复杂度最好o(n)最差o(n^2)平均o(n^2) 稳定排序//冒泡排序void bubbleSort(vector<int> &v)...原创 2019-08-20 16:44:31 · 250 阅读 · 0 评论 -
数组全排列
数组全排列#include <iostream>#include <vector>#include <algorithm>using namespace std;bool swapAccepted(vector<int> array, int start, int end) //如果后面有重复的数{ for (int i = start...原创 2019-08-16 21:02:09 · 126 阅读 · 0 评论