1.

The Worst case occurs 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 addressed to me during an internship interview.My question is taken from Algorithms topic in portion Algorithms of Discrete Mathematics

Answer»

Right answer is (d) Item is the last element in the array or is not there at all

The best I can EXPLAIN: 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