User
User

Reputation: 1726

What is the worst case runtime for Linear search and Binary search?

I believe the worst case asymptotic complexities for Linear search and Binary Search are O(n) and O(lgn) respectively. Am I correct?

Upvotes: 0

Views: 250

Answers (1)

templatetypedef
templatetypedef

Reputation: 372814

Yes, that's correct. Can you find examples of cases that trigger these run times?

Upvotes: 2

Related Questions