πŸ“Š Design and Analysis of Algorithms
Q. Recurrence equation formed for the tower of hanoi problem is given by
  • (A) t(n) = 2t(n-1)+n
  • (B) t(n) = 2t(n/2)+c
  • (C) t(n) = 2t(n-1)+c
  • (D) t(n) = 2t(n/2)+n
πŸ’¬ Discuss
βœ… Correct Answer: (C) t(n) = 2t(n-1)+c

Explanation: as there are 2 recursive calls to n-1 disks and one constant time operation so the recurrence relation will be given by t(n)


Explanation by: Mr. Dubey
as there are 2 recursive calls to n-1 disks and one constant time operation so the recurrence relation will be given by t(n)

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
139
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate