排序
wangfy_
这个作者很懒,什么都没留下…
展开
-
快速排序
zjumooc#include <cstdio>const int MAXN = 1010;int a[MAXN] = {10,9,8,7,6,5,4,3,2,1};void swap(int i, int j) { int temp = a[i]; a[i] = a[j]; a[j] = temp; } int median3(int a[], int left...原创 2018-04-14 00:12:27 · 214 阅读 · 1 评论 -
1141 PAT Ranking of Institutions (25)
(待)原创 2018-05-14 22:35:06 · 145 阅读 · 0 评论 -
1012 The Best Rank (25)
(待)原创 2018-06-10 08:37:41 · 169 阅读 · 0 评论 -
1017 Queueing at Bank (25)
#include <cstdio>#include <iostream>#include <algorithm>using namespace std;const int MAXN = 10010;struct customer { int arriveTime; int processTime;} Customer[MAXN];s...原创 2018-06-25 18:01:29 · 122 阅读 · 0 评论 -
排序
目录插入排序 直接插入排序 折半插入排序 希尔排序交换排序 冒泡排序(面试必问) 快速排序选择排序 简单选择排序 堆排序归并排序基数排序插入排序 直接插入排序public void insertSort(int arr[]) { int len = arr.length(); f...原创 2019-03-03 23:20:36 · 97 阅读 · 0 评论