1.

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 suitableThis question was addressed to me in examination.I would like to ask this question from Largest and Smallest Number in an Array using Recursion topic in portion Recursion of Data Structures & Algorithms II

Answer»

The correct answer is (C) Both recursion and ITERATION

The best I can explain: Both recursion and iteration can be used to FIND the largest and smallest element in an ARRAY.



Discussion

No Comment Found

Related InterviewSolutions