613 views
0 0 votes
How "a fibonacci algorithm runs in polynomial time in n but the optimal running time is exponential in n."?

Is it possible to running same algorithm in both polynomial and exponential time?

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
2 2 answers
3.8k
3.8k views
Lakshman Bhaiya asked Nov 13, 2018
3,840 views
Consider the following code segment to find the $n^{th}$ Fibonacci number:Fib(n) { if(n==0) {return 0;} if(n==1) {return 1;} else { return(Fib(n-1) + Fib(n...
0 0 votes
2 2 answers
1.2k
1.2k views
Parshu gate asked Nov 5, 2017
1,161 views
PLEASE EXPLAIN HOW TO APPROACH THESE KIND OF PROBLEMSLet $\mathrm{F}_{\mathrm{k}}$ denote the $\mathrm{k}^{\text {th }}$ Fibonacci number. If $\mathrm{F}_{\mathrm{n}}$ ca...
1 1 vote
1 answers 1 answer
2.4k
2.4k views
Prabhanjan_1 asked Oct 30, 2017
2,372 views
Which of the following is true about time complexity for generating $\color{blue} {n^{th}}$ Fibonacci number ? a)$O(n)$b)$O(Logn)$c)$O(2^n)$d)$\Omega(n)$
3 3 votes
1 1 answer
3.5k
3.5k views
sumit_kumar asked Jun 25, 2017
3,519 views
what is time comlexity procedure for following recursive equation by substitution method:T(n)= T(n-1)+T(n-2) , if n>=2 =1 , if n=1; =0 , if n=0.