1.汉若塔.................................................................................................................................................................................................2
2.费式数列.............................................................................................................................................................................................2
3. 巴斯卡三角形....................................................................................................................................................................................3
4.三色棋.................................................................................................................................................................................................4
5.老鼠走迷官(一).............................................................................................................................................................................6
6.老鼠走迷官(二).............................................................................................................................................................................7
7.骑士走棋盘.........................................................................................................................................................................................9
8.八皇后................................................................................................................................................................................................11
9.八枚银币...........................................................................................................................................................................................13
10.生命游戏.........................................................................................................................................................................................14
11.字串核对.........................................................................................................................................................................................17
12.双色、三色河内塔.........................................................................................................................................................................18
13.背包问题(Knapsack Problem)...................................................................................................................................................22
14.蒙地卡罗法求 PI............................................................................................................................................................................25
15.Eratosthenes 筛选求质数................................................................................................................................................................26
16.超长整数运算(大数运算).........................................................................................................................................................28
17.长 PI.................................................................................................................................................................................................29
18.最大公因数、最小公倍数、因式分解.........................................................................................................................................32
19.完美数.............................................................................................................................................................................................34
20.阿姆斯壮数.....................................................................................................................................................................................37
21.最大访客数.....................................................................................................................................................................................37
22.中序式转后序式(前序式).........................................................................................................................................................39
23.后序式的运算.................................................................................................................................................................................42
24.洗扑克牌(乱数排列).................................................................................................................................................................44
25.Craps 赌博游戏...............................................................................................................................................................................45
26.约瑟夫问题(Josephus Problem)................................................................................................................................................47
27.排列组合.........................................................................................................................................................................................49
28.格雷码(Gray Code)....................................................................................................................................................................50
29.产生可能的集合.............................................................................................................................................................................52
30.m 元素集合的 n 个元素子集..........................................................................................................................................................54
31.数字拆解.........................................................................................................................................................................................56
32.得分排行.........................................................................................................................................................................................58
33.选择、插入、气泡排序.................................................................................................................................................................60
34.Shell 排序法 - 改良的插入排序....................................................................................................................................................63
35.Shaker 排序法 - 改良的气泡排序.................................................................................................................................................65
36.排序法 - 改良的选择排序..............................................................................................................................................................67
37.快速排序法(一).........................................................................................................................................................................70
38.快速排序法(二).........................................................................................................................................................................72
39.快速排序法(三).........................................................................................................................................................................73
40.合并排序法.....................................................................................................................................................................................76
41.基数排序法.....................................................................................................................................................................................78
42.循序搜寻法(使用卫兵).............................................................................................................................................................80
43.二分搜寻法(搜寻原则的代表).................................................................................................................................................82
44.插补搜寻法.....................................................................................................................................................................................84
45.费氏搜寻法.....................................................................................................................................................................................86
46.稀疏矩阵.........................................................................................................................................................................................90
47.多维矩阵转一维矩阵.....................................................................................................................................................................91
48.上三角、下三角、对称矩阵.........................................................................................................................................................93
49.奇数魔方阵.....................................................................................................................................................................................94
50.4N 魔方阵.......................................................................................................................................................................................96
51.2(2N+1) 魔方阵..............................................................................................................................................................................97
评论1
最新资源