回复 楼主 whukeming
'
(1)-1 Hanoi(1,’a’,’b’,’c’)=move(‘a’,’c’)---1
(1) Hanoi(2,’a’,’c’,’b’)=(1)-2 move(‘a’,’b’)------------------------------2
(1)-3 Hanoi(1,’c’,’a’,’b’) =move(‘c’,’b’)--3
Hanoi(3,’a’,’b’,’c’)= (2) move(‘a’,’c’)---------------------------------------------------------------4
(3)-1 Hanoi(1,’b’,’c’,’a’)=move(‘b’,’a’)---5
(3) Hanoi(2,’b’,’a’,’c’)=(3)-2 move(‘b’,c’)--------------------------------6
(3)-3 Hanoi(1,’a’,’b’,’c’)=move(‘a’,’c’)---7
[
本帖最后由 helloUJS 于 2013-4-2 19:38 编辑 ]