摘要:http://www.cs.usfca.edu/~galles/visualization/Algorithms.html
阅读全文
摘要:在一天的24小时之中,时钟的时针、分针和秒针完
阅读全文
摘要:publicvoidinsertSort(List<Integer>list){if(list.size()<2)return;for(inti=1;i<list.size();i++){inttemp=list.get(i);intbefore=list.get(i-1);if(temp>before)continue;for(intj=0;j<i;j++){if(list.get(j)>temp){list.remove(i);list.add(j,temp);break;}}}}@TestpublicvoidtestInsertSort(){Li
阅读全文
摘要: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
阅读全文
摘要:http://www.cnblogs.com/morewindows/archive/2011/08/13/2137415.html
阅读全文