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.
912
0
Do you find this helpful?
2

Discussion

No comments yet