Question

In a binary search algorithm, what is the time complexity of searching an element in a sorted array of size n?     

A O(n)
B O(log n)
C O(n^2)
D O(1)
E O(n log n)
Practice Next

Relevant for Exams:

Hey! Ask a query