- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Which of the following methods can be us...

Q. |
## Which of the following methods can be used to find the largest and smallest element in an array? |

A. | recursion |

B. | iteration |

C. | both recursion and iteration |

D. | no method is suitable |

Answer» C. both recursion and iteration | |

Explanation: both recursion and iteration can be used to find the largest and smallest element in an array. |

View all MCQs in:
Design and Analysis of Algorithms

- Which of the following methods can be used to find the largest and smallest number in a linked list?
- Given an array, check if the array can be divided into two subsets such that the sum of elements of the two subsets is equal. This is the balanced partition problem. Which of the following methods can be used to solve the balanced partition problem?
- For any array, given that at most one element is non-zero, it is ALWAYS possible to reach the end of the array using minimum jumps.
- Which of the following techniques can be used to search an element in an unsorted array?
- For a given array, there can be multiple ways to reach the end of the array using minimum number of jumps.
- 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 search an element in a linked list?
- The longest increasing subsequence problem is a problem to find the length of a subsequence from a sequence of array elements such that the subsequence is sorted in increasing order and it’s length is maximum. This problem can be solved using
- What is the space complexity of the divide and conquer algorithm used to find the maximum sub-array sum?
- Which of the following methods can be used to find the sum of digits of a number?

Login to Continue

It will take less than 2 minutes

Report MCQ