下面C++函数中采用的算法是( )。

int fib(int n){   int i, f[n]={0, 1};    for(int i=2; i<=n; i++)      f[i]=f[i-1]+f[i-2];    return f[n];} 
填写答案