long int F(int n){
long int F[n];
if (n<2) return n;
else {
F[0]=0; F[1]=1;
for (int i=2; i<n+1; i++)
F[i]=F[i-1]+F[i-2];
return F[n]; }
}
Hi guys, can anyone know how to compute the time complexity of the function above? I am studying C++ and I am quite suffering about compute time complexity of a random algorithm. Please help me! Thanks in advance.