Hanoi
来源:互联网 发布:淘宝产品拍摄方案 编辑:程序博客网 时间:2024/06/02 01:14
public class Hanoi {
public static void main(String[] args) { hanoi(10,'a','b','c');}private static void hanoi(int n,char src,char support,char dest) { if (n == 1) { System.out.println(src + "-->" + dest); }else{ hanoi(n - 1, src, dest, support); System.out.println(src + "-->" + dest); hanoi(n - 1,support,src,dest); }}
}
阅读全文
0 0
- Hanoi
- Hanoi
- Hanoi
- Hanoi。。。。
- Hanoi
- hanoi
- Hanoi
- hanoi
- hanoi
- hanoi
- hanoi
- hanoi
- hanoi
- Hanoi
- hanoi
- Hanoi
- Hanoi
- hanoi
- Fibonacci 动态规划
- bower安装好了angular 1.6.6,但是还是不能使用angular
- 随便输入一个数,从0到n的偶数之和
- 最终版】BurpSuite_Pro 1.7.27 Pro 破解版
- 简单的三角形
- Hanoi
- Viewpager的使用
- HeapSort
- SQL (mysql)最常用代码整理 基础知识
- shell学习之-sed用法解析
- MySQL 5.6
- C#---带有参数的构造函数
- linux系统编译链接总结--高级c/c++编译技术读后总结(上)
- 初学Qt:国际化解决中文乱码以及生成多语言版本的软件