The running time T (n), where 'n' is input size of a recursive algorithm, is given as
T (n) = c + T (n - 1), if n > 1
= d, if n ≤ 1
The order of the algorithm is
A. | n2 |
B. | n |
C. | n3 |
D. | nn |
Answer : B Explanation :
Recuesivelt applying the relation, we get |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |