GATE CS 2012 · Asymptotic Analysis & Recurrences

MCQ · 1 mark · Problem PROG-DIVC-0111

The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is
  1. A
    T(n) = 2T(n - 2) + 2
  2. B
    T(n) = 2T(n - 1) + n
  3. C
    T(n) = 2T(n/2) + 1
  4. D
    T(n) = 2T(n - 1) + 1

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/48/gate2012-16

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com