Linear size of Binary Search

How can Binary Search have a Linear Time Complexity, when it has O(log N).

Hey @Kishan-Mishra-2464674013761441 if the data structure is such that only sequential access is allowed meaning to access the nth element the time complexity is O(n) (like in linked list) the binary search Time complexity would be O(n). binary search has O(logn) time complexity only in data structures where time to access the nth element is O(1)
That is why the time complexity of binary search on arrays is O(logn) but on list is O(n)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.