![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
algorithm
啊_哦_啊
这个作者很懒,什么都没留下…
展开
-
堆排序
#include <iostream>void heapAdjust(int a[],int s,int e){ int tmp = a[s]; int j = 2*s + 1; int c = s; for(; j <= e;c = j,j = 2*j + 1) { if( (j + 1) <= e && a[j] &...原创 2018-02-28 19:03:14 · 96 阅读 · 0 评论 -
quick sort
//快速排序主要采用递归的方式进行调用。#include <iostream>void swap(int s[],int i,int j){ int tmp = s[j]; s[j] = s[i]; s[i] = tmp;}int partition(int s[],int l,int r){ int low = l; int ...原创 2018-08-08 08:56:53 · 121 阅读 · 0 评论 -
insert sort
//// Created by Admin on 2018/4/26.//#ifndef ALGORITHM_INSERTSORT_H#define ALGORITHM_INSERTSORT_H#include <vector>class InsertSort { public: InsertSort() = default; virtual ~Insert...原创 2018-08-08 10:41:38 · 171 阅读 · 0 评论