我的快速排序
摘要:
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) 编辑