摘要:
/*汉诺塔的玩法: * 游戏的规则:将A柱上的盘子移动到C柱上,大盘必须在小盘之上。 * 1 当A柱上只有一个盘子的时候,直接移动到C柱上; * 2 当A柱上有两个盘子的时候, * 将A柱上的1盘(从上到下编号)移动到B柱, * 将A柱上的2盘移动到C柱, * 将B柱上的1盘移动到C柱; * (将A 阅读全文
摘要:
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 阅读全文
摘要:
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 } 阅读全文
摘要:
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 阅读全文