数据结构与算法
李文文丶
个人博客:blog.liwenguang.com
展开
-
郝斌数据结构关于汉诺塔的C算法解析
算法: #include void hannuota(int n, char A,char B, char C) { 5 if(1==n) 6 { 7 printf("将编号为%d的盘子直接从%c柱子移到%c柱子\n",n,A,C); 8 } 9 else 10 { 11 hannuota(n-1,A,C,B); 12 printf("将编号为%d的盘子直接从%c柱子移到%c柱子\n"原创 2016-01-17 14:36:57 · 1031 阅读 · 0 评论 -
ACM
杭电1.3.1 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th r原创 2016-04-07 21:42:56 · 288 阅读 · 0 评论 -
算法导论第一集
归并排序: 最后的树的logn: n,n/2,n/4,..,1 ==》n/2^0,n/2^1,..,n/2^(x-1)==>n/2^(x-1)==1 ==>x = log2n 总数: 到最后一层数=2^h ,即2^log2n = n原创 2016-04-13 22:08:52 · 264 阅读 · 0 评论 -
算法导论第二集
三个分析方法:以及两个符号:原创 2016-04-14 19:13:49 · 214 阅读 · 0 评论 -
算法导论第三集
原创 2016-04-14 21:59:12 · 192 阅读 · 0 评论