1.

Which of the following techniques can be used to search an element in an unsorted array?(a) Iterative linear search(b) Recursive binary search(c) Iterative binary search(d) Normal binary searchThe question was posed to me by my school teacher while I was bunking the class.My question is based upon Search an Element in an Array using Recursion in chapter Recursion of Data Structures & Algorithms II

Answer»

The correct answer is (a) Iterative linear SEARCH

Explanation: Iterative linear search can be USED to search an ELEMENT in an unsorted ARRAY.

Note: Binary search can be used only when the array is SORTED.



Discussion

No Comment Found

Related InterviewSolutions