2013年3月1日

快速排序 Quick Sort

摘要: // low is the first index and high is the last index in the arrayint Rico_partition(int* arr, int low, int high){ //使用while循环,最终low与high会合(low==high) while (low < high) { //取下标为low的作为中心值 int temp = arr[low]; //从后往前进行比较,知道当前记录的排序码小于等于中心值 while (low<high && arr[hig... 阅读全文

posted @ 2013-03-01 23:58 Rico Huang 阅读(148) 评论(0) 推荐(0) 编辑

导航