passer1991

随笔分类 -  数据结构

旧金山大学的算法可视化学习教程 赞的教程,将抽象的算法可视化,易于理解
摘要:http://www.cs.usfca.edu/~galles/visualization/Algorithms.html 阅读全文

posted @ 2014-01-20 10:07 passer1991 阅读(186) 评论(0) 推荐(0)

在一天的24小时之中,时钟的时针、分针和秒针完
摘要:在一天的24小时之中,时钟的时针、分针和秒针完 阅读全文

posted @ 2012-11-09 16:30 passer1991 阅读(203) 评论(0) 推荐(0)

插入排序
摘要: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 阅读全文

posted @ 2012-10-05 15:28 passer1991 阅读(139) 评论(0) 推荐(0)

我的快速排序
摘要: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 阅读(148) 评论(0) 推荐(0)

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

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

导航