分治
文章平均质量分 73
__Vincent__
我不去想是否能够成功既然选择了远方便只顾风雨兼程
展开
-
[POJ] 2299 -> Ultra-QuickSort
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 46284 Accepted: 16842 Description In this problem, you have to analyze a particular sorting a原创 2015-05-03 15:38:46 · 394 阅读 · 0 评论 -
期待为线性时间的选择算法
#include using namespace std; int partion(int* arr, int left, int right){ int i = left, j = right, x = arr[i]; while (i < j){ while (i < j && x <= arr[j]) --j; if (i < j) arr[i++] = arr[j];原创 2015-05-03 22:42:12 · 480 阅读 · 0 评论