in Algorithms retagged by
1,050 views
1 vote
1 vote
What is the worst case complexity for searching for a key in a sorted array using Binary Search??
in Algorithms retagged by
1.1k views

2 Comments

O(n)..

skewed binary search tree..
–1
–1
sorry - O(log n).
0
0

2 Answers

3 votes
3 votes
Best answer

In a sorted array, we can apply binary search algorithm which takes O($logn$) time in worst case to search a key.

Reference:Binary search

selected by
by

1 comment

Thanks :)
1
1
0 votes
0 votes

binary serach = O(log(n))

Related questions