What is the worst case run-time complexity of binary search algorithm?
Answers
Answered by
5
Worst-case performance O(log n)
Answered by
0
Binary search has a worst-case time complexity of O(log(n)).
How does binary search work?
- Binary search is a search technique used in computer science that identifies the location of a target value within a sorted array.
- It is also referred to as half-interval search, logarithmic search, or binary chop.
- With this method, an array's middle is always searched for the element.
- Only on a list of things that has been sorted can binary search be used.
#SPJ3
Similar questions