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