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. |

912

0

Do you find this helpful?

2

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- How many recursive calls are there in Recursive matrix multiplication by Strassen’s Method?
- What is the advantage of iterative code for finding power of number over recursive code?
- Recursive approach to find power of a number is preferred over iterative approach.
- What is the least time in which we can raise a number x to power y?
- Which of the following recursive formula can be used to find the factorial of a number?
- Which of the following is true about the time complexity of the recursive solution of the subset sum problem?
- Which of the following is true about the time complexity of the recursive solution of set partition problem?
- Suppose you have coins of denominations 1,3 and 4. You use a greedy algorithm, in which you choose the largest denomination coin which is not greater than the remaining sum. For which of the following sums, will the algorithm produce an optimal answer?
- What is the time complexity of the above recursive implementation used to reverse a string?
- What will be the recurrence relation of the code of recursive selection sort?