in ques 2, we have used binary_search, so , why its time complexity is linear in the size of list?why not logarithmic?
Ques 2 time complexity
Mid element cannot be found in O(1)
but binary search has time complexity log(n), then why not logarithmic
In an array random access is possible so it takes o(1) time but that’s not the case with linked list. Do a dry run to have a better understanding
oh, ohk its a list , i thought of array.
Please mark your doubt as resolved if it’s clear now
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.