zh/algorithms/hanoitower #11
Replies: 7 comments 6 replies
-
|
感恩,让我学会了递归 |
Beta Was this translation helpful? Give feedback.
-
|
虽然1个圆盘和2个圆盘很简单,但觉得还是有必要设置出来的,可以帮助形成思维 |
Beta Was this translation helpful? Give feedback.
-
|
几分钟就弄出来了,成就感满满 |
Beta Was this translation helpful? Give feedback.
-
|
总结一下就是,需要移动的那一摞是单数时,就把最顶上圆盘往目标位置移动;是双数时,就把圆盘往目标之外的位置移动。 |
Beta Was this translation helpful? Give feedback.
-
|
自动模式如果有暂停功能更好理解 |
Beta Was this translation helpful? Give feedback.
-
|
很好用 |
Beta Was this translation helpful? Give feedback.
-
|
移动一个n阶 等效于 移动一次n-1阶 然后移动最下面那个 再移动一次n-1阶 即 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
zh/algorithms/hanoitower
经典的汉诺塔问题,从任意初始状态开始,用递归算法找到后续步骤。可以调整圆盘数量,选择手动或自动模式,获取提示,切换模式,源码开放。
https://gallery.selfboot.cn/zh/algorithms/hanoitower
Beta Was this translation helpful? Give feedback.
All reactions