摘要: /*汉诺塔的玩法: * 游戏的规则:将A柱上的盘子移动到C柱上,大盘必须在小盘之上。 * 1 当A柱上只有一个盘子的时候,直接移动到C柱上; * 2 当A柱上有两个盘子的时候, * 将A柱上的1盘(从上到下编号)移动到B柱, * 将A柱上的2盘移动到C柱, * 将B柱上的1盘移动到C柱; * (将A 阅读全文
posted @ 2016-02-06 14:27 robin_X 阅读(861) 评论(1) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 //typedef 80 MAXSIZE; 5 #define MAXSIZE 20 6 7 typedef struct Node{ 8 int data; 9 int cursor; 10 }Node,St 阅读全文
posted @ 2016-02-04 17:55 robin_X 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<malloc.h> 4 5 typedef int Elemtype; 6 7 typedef struct Node{ 8 int data; 9 struct Node* next; 10 } 阅读全文
posted @ 2016-02-04 17:53 robin_X 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef int Elemtype; 5 #define MAXSIZE 20 6 7 typedef struct List{ 8 Elemtype data[MAXSIZE]; 9 int lengt 阅读全文
posted @ 2016-02-04 17:35 robin_X 阅读(500) 评论(0) 推荐(0) 编辑