文件名称:tower-of-honait-
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.36kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
PROGRAMMED BY : REHAN AHMED KHAN
PAKISTAN- KARACHI
BS student in FAST University
(foundation for advancement of science and technology)
this program is free ware and anyone can use it.
/************************************************************************************************/
/*************************************************************************************************
* THE ALGORITHM USED IS AS FOLLOWS *
* *
* Because the tree is complete it can be stored in an array of 2^n-1. *
* The root of the tree is in position 2^(n-1)-1 *
* for any level j, the first node at that level is in position 2^(n-1-j)-1 *
* and each successive node at that level is 2^(n-j) elements beyond the previous element *
* at that level *
* So the sequential traversal of the array produces the solution of Towers of Hanoi Problem *
PAKISTAN- KARACHI
BS student in FAST University
(foundation for advancement of science and technology)
this program is free ware and anyone can use it.
/************************************************************************************************/
/*************************************************************************************************
* THE ALGORITHM USED IS AS FOLLOWS *
* *
* Because the tree is complete it can be stored in an array of 2^n-1. *
* The root of the tree is in position 2^(n-1)-1 *
* for any level j, the first node at that level is in position 2^(n-1-j)-1 *
* and each successive node at that level is 2^(n-j) elements beyond the previous element *
* at that level *
* So the sequential traversal of the array produces the solution of Towers of Hanoi Problem *
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tower of honait .cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.