Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

GATE | GATE CS 2012 | Question 16

  • Last Updated : 28 Jun, 2021

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: See question 1 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-29/

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :