1.

The complexity of Binary search algorithm is _________(a) O(n)(b) O(log)(c) O(n^2)(d) O(n log n)This question was addressed to me during an interview.This interesting question is from Algorithms topic in chapter Algorithms of Discrete Mathematics

Answer» CORRECT answer is (B) O(log)

To EXPLAIN: The compexity of binary search is O(LOGN).


Discussion

No Comment Found

Related InterviewSolutions