摘要: public class Fibonacci{ public static long F(long n){ System.out.println("call F" + n); if (n == 0) return 0; if (n == 1) return 1; long t = F(n-1) + 阅读全文
posted @ 2016-02-22 16:48 hopskin1 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 格雷码 the n-1 bit code, with 0 prepended to each word, followd by the n-1 bit code in reverse order, with 1 prepended to each word. public class GrayCod 阅读全文
posted @ 2016-02-22 16:03 hopskin1 阅读(258) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> void towers(int,char,char,char); int main() { int num; printf("Enter the number of disks : "); scanf("%d", &num); printf("The sequen 阅读全文
posted @ 2016-02-22 09:14 hopskin1 阅读(378) 评论(0) 推荐(0) 编辑