McqMate

Q. |
## In general, which of the following methods isn’t used to find the factorial of a number? |

A. | recursion |

B. | iteration |

Answer» A. recursion | |

Explanation: the function counts the number of vowels in a string. in this case the number is vowels is 6. |

1.8k

0

Do you find this helpful?

20

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Which of the following recursive formula can be used to find the factorial of a number?
- You are given n dice each having f faces. You have to find the number of ways in which a sum of S can be achieved. This is the dice throw problem. Which of the following methods can be used to solve the dice throw problem?
- Which of the following methods can be used to find the sum of digits of a number?
- Which of the following methods can be used to find the largest and smallest number in a linked list?
- Which of the following methods can be used to find the nth Catalan number?
- Given a string, you have to find the minimum number of characters to be inserted in the string so that the string becomes a palindrome. Which of the following methods can be used to solve the problem?
- Which of the following methods can be used to find the largest and smallest element in an array?
- Given a 2D matrix, find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?
- Given a rod of length n and the selling prices of all pieces smaller than equal to n, find the most beneficial way of cutting the rod into smaller pieces. This problem is called the rod cutting problem. Which of these methods can be used to solve the rod cutting problem?
- Which of the following recurrence relations can be used to find the nth fibonacci number?