1.

The Worst case occur in linear search algorithm when _________(a) Item is somewhere in the middle of the array(b) Item is not in the array at all(c) Item is the last element in the array(d) Item is the last element in the array or is not there at allThis question was posed to me in my homework.Origin of the question is Algorithms in chapter Algorithms of Discrete Mathematics

Answer»

Correct OPTION is (d) Item is the last ELEMENT in the array or is not there at all

To explain I would SAY: The Worst CASE occur in linear SEARCH algorithm when Item is the last element in the array or is not there at all.



Discussion

No Comment Found

Related InterviewSolutions