McqMate
Q. |
Recursive program to raise an integer x to power y uses which of the following algorithm? |
A. | dynamic programming |
B. | backtracking |
C. | divide and conquer |
D. | greedy algorithm |
Answer» C. divide and conquer | |
Explanation: the recursive approach uses divide and conquer algorithm as we break the problem into smaller parts and then solve the smaller parts and finally combine their results to get the overall solution. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet