Gate CS-2012 Question Paper With Solutions

Q. 16 The recurrence relation capturing the optimal execution time of the Towers of
hanoi problem with n discs is

(A) T(n) = 2T(n − 2) + 2

(B) T(n) = 2T(n − 1) + n

(C) T(n) = 2T(n/2) + 1

(D) T(n) = 2T(n − 1) + 1

Answer: (D)

Explanation:

Gate CS-2012 Question Paper With Solutions

Learn More:   Gate ME-2018-1 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here