1.

The complexity of linear search algorithm is _________(a) O(n)(b) O(log n)(c) O(n^2)(d) O(n log n)The question was posed to me in a national level competition.This is a very interesting question from Algorithms topic in chapter Algorithms of Discrete Mathematics

Answer» CORRECT answer is (a) O(N)

BEST explanation: The worst case complexity of linear SEARCH is O(n).


Discussion

No Comment Found

Related InterviewSolutions