数据结构-汉诺塔-实验报告
所属分类:Windows编程
开发工具:Visual C++
文件大小:17KB
下载次数:1
上传日期:2017-12-13 11:59:17
上 传 者:会飞的树叶
说明: 1.1实验目的及要求
设计数据结构表示3座宝塔和n个碟子:
输出每一次移动碟子的情况
分析算法的时间性能
1.2实验设计
1;将塔A上的n-1个碟子借助塔C移动到塔B上
2:把塔A上剩下的一个碟子移动到塔C上
3:将n-1个碟子从塔B借助于塔A移到塔C上
三座宝塔(塔A,塔B,塔C)分别用三个字符型变量A,B,C表示,n个碟子从1 开始连续自然数编号
(1.1 the purpose and requirements of the experiment
The design data structure represents 3 pagodas and N plates.
The case of each moving dish.
Analysis of the time performance of the algorithm
1.2 experimental design
1; the N-1 plates on the tower A are moved to the tower B with the aid of the tower C
2: move one of the remaining plates on the tower A to the tower C
3: n-1 B A with the dish from the tower tower to tower C
Three pagodas (tower A, tower B, pagoda C), respectively, three character variables A, B, and C, respectively, indicate that the N plates are numbered from 1 to the natural number.)
近期下载者:
相关文件:
收藏者: