ISRO Computer Science (CSE) 2018 - Question 70

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2018

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. T(1) = T(2) = T(3)

| | All questions of ISRO Computer Science (CSE) 2018