
排序
chasein
这个作者很懒,什么都没留下…
展开
-
归并排序
c++实现 #include <iostream> using namespace std; void merge(int array1[], int first, int last){ int mid = (first + last) / 2; int i1 = 0; int i2 = first; int i3 = mid + 1; int temp[last - fi...原创 2018-12-09 09:13:12 · 152 阅读 · 0 评论 -
快速排序
#include<iostream> using namespace std; void quickSort(int a[], int low, int high){ if(low >= high) return; int left = low; int right = high; int key = a[left]; while(left < right)...原创 2019-02-01 23:59:32 · 112 阅读 · 0 评论