✅ 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];
}