McqMate
| 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 |
| 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) | |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet