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
- 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
Solve it on GATE DA practice →More Searching & Sorting Algorithms problems
Show the worked solution
Official 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