logo

Crowdly

Browser

Add to Chrome

Визначити складність алгоритму  int f(int n) { if (n <= 2) return 1; f[1] ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Визначити складність алгоритму 

int f(int n)

{

if (n <= 2) return 1;

f[1] = 1; f[2] = 1;

for (int i = 3; i <= n; i++)

{

f[i] = f[i - 1] + f[i - 2];

}

return f[n];

}

0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on dl.nure.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome