河内塔使用递归

编程入门 行业动态 更新时间:2024-10-23 14:23:55
本文介绍了河内塔使用递归的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对河内塔一无所知.我想使用递归为此编写一个程序.

I have no idea about Tower of Hanoi. I want to write a program on this using recursion.

推荐答案

来自 Wikipedia :

河内之塔或河内之塔 (也称为梵天塔) 是数学游戏或益智游戏.它 由三根杆和一个 不同大小的磁盘可以 滑到任何杆上.难题开始 磁盘整齐排列 一根杆的最大尺寸,最小为 顶部,从而制成圆锥形.

The Tower of Hanoi or Towers of Hanoi (also known as The Towers of Brahma) is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks neatly stacked in order of size on one rod, the smallest at the top, thus making a conical shape.

查看递归解决方案.

更多推荐

河内塔使用递归

本文发布于:2023-11-30 03:10:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648526.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:递归   河内

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!