M

Mr. Dubey • 52.30K Points
Coach

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
Correct : Option (C)

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.

Share

Discusssion

Login to discuss.

Be the first to start discuss.