ISRO | ISRO CS 2018 | Question 70
The running time of an algorithm is given by
T(n) = T(n-1) + T(n-2) — T(n-3), if n > 3
= n, otherwise
Then what should be the relation between T(1), T(2) and T(3), so that the order of the algorithm is constant ?
(A) T(1) = T(2) = T(3)
(B) T(1) + T(3) = 2 * T(2)
(C) T(1) – T(3) = T(2)
(D) T(1) + T(2) = T(3)
Answer: (A)
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post
Last Updated :
04 Jul, 2018
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...