The River is Just a River  
If you're absent from my struggle,then,don't be present for my success

随笔分类 -  Algorithm

  • 动态规划 求解Fibonacci
    摘要:使用了4种方法求解Fabonacci数列,代码如下:(假设数列为 0 1 1 2 3 5 ……)注意第一项以0开始 1 #include <iostream> 2 #include <time.h> 3 #include <math.h> 4 using namespace std; 5 6 //递归求解 7 int fib_recursion( int n ) 8 { 9 10 if( n==0 ) return 0;11 if( n==1 ) return 1;12 13 return fib_recursion(n-1) + fib_recursion 阅读全文
    posted @ 2012-03-31 21:57 TiffanyZhou 阅读(530) 评论(0) 推荐(0)