Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Algorithms Searching, Sorting and Hashing Searching
Consider the following array:
A = {2, 5, 8, 17, 19, 34, 45, 67, 78, 87}
What is the time complexity of the binary search algorithm when 98 is searched?
1
O(n2)
2
O(n)
3
O(logn)
4
O(2n)