Hey, guys, what's up?
So in the last video, we learned what is a linear search.
So in this video, we will learn what is the problem with the linear search.
So the problem is very straightforward.
So what was the time, complexity, what I should say, how many number of steps linezolid take?
So it takes a number of steps to find the key in an eddy.
OK, so if you have an answer to that, it is taking any steps to find the key if you have a starter
ready.
Then also it is taking and steps to find the key.
Right, because linear search just perform a linear scan over the array.
So linear search, just perform a linear scan over the array.
It is not using the property that the given area is sorted or the given area is unsorted.
OK, so if the given that is sorted, then I won't let my time complexity should be logged and no steps
should be logged.
And so this is my requirement.
OK.
So the problem with surge is that it is not taking into consideration that whether the given area is
unsorted or whether the given area is sorted, it will just take any steps.
It doesn't matter whether they're given that is sorted or not sorted.
OK, but my requirement is if the given that is sorted, I want that my finding the search operation
should be done and Logan steps.
OK, so this is my requirement that if the given that is sorted I want searching operation and Logan
steps.
So this is the requirement.
OK, so it cannot search in log in time.
It will do a linear scan, hence it requires insteps.
So for login steps we have something called binary search.
OK, so binary search.
Well, Search and Logan Steps.
And next, we do we will talk about how binary search searches for a given value and login steps.
OK, so this is it for this video.
Thank you.