1.

The time complexity of binary search is given by ___________(a) constant(b) quardratic(c) exponential(d) none of the mentionedI got this question by my school principal while I was bunking the class.Question is taken from Algorithms in division Algorithms of Discrete Mathematics

Answer»

Right choice is (d) NONE of the mentioned

For explanation I WOULD say: It is O(log2n), therefore COMPLEXITY will be LOGARITHMIC.



Discussion

No Comment Found

Related InterviewSolutions