passer1991

2012年10月4日

我的快速排序

摘要: privatevoidquickSort(int[]arr,intbegin,intend){if(begin>=end)return;intlow=begin;inthigh=end;intindex=begin;inttemp=arr[begin];booleanflag=false;//当flag的值为true向前,否则向后while(low!=high){if(flag){for(;low<high;low++){if(arr[low]>temp){arr[high]=arr[low];high--;index=low;flag=false;break;}}}else 阅读全文

posted @ 2012-10-04 10:29 passer1991 阅读(142) 评论(0) 推荐(0) 编辑

快速排序

摘要: http://www.cnblogs.com/morewindows/archive/2011/08/13/2137415.html 阅读全文

posted @ 2012-10-04 09:25 passer1991 阅读(82) 评论(0) 推荐(0) 编辑

导航