1 00:00:02,110 --> 00:00:03,780 Hey, guys, what's up? 2 00:00:04,300 --> 00:00:09,110 So in the last video, we learned what is a linear search. 3 00:00:09,670 --> 00:00:14,440 So in this video, we will learn what is the problem with the linear search. 4 00:00:14,920 --> 00:00:16,810 So the problem is very straightforward. 5 00:00:17,290 --> 00:00:22,800 So what was the time, complexity, what I should say, how many number of steps linezolid take? 6 00:00:23,080 --> 00:00:27,590 So it takes a number of steps to find the key in an eddy. 7 00:00:28,360 --> 00:00:37,030 OK, so if you have an answer to that, it is taking any steps to find the key if you have a starter 8 00:00:37,030 --> 00:00:37,360 ready. 9 00:00:38,150 --> 00:00:42,160 Then also it is taking and steps to find the key. 10 00:00:42,430 --> 00:00:48,040 Right, because linear search just perform a linear scan over the array. 11 00:00:48,490 --> 00:00:53,090 So linear search, just perform a linear scan over the array. 12 00:00:53,440 --> 00:00:59,770 It is not using the property that the given area is sorted or the given area is unsorted. 13 00:01:01,140 --> 00:01:10,710 OK, so if the given that is sorted, then I won't let my time complexity should be logged and no steps 14 00:01:10,710 --> 00:01:11,670 should be logged. 15 00:01:11,670 --> 00:01:13,530 And so this is my requirement. 16 00:01:14,560 --> 00:01:14,970 OK. 17 00:01:16,320 --> 00:01:24,090 So the problem with surge is that it is not taking into consideration that whether the given area is 18 00:01:24,090 --> 00:01:29,830 unsorted or whether the given area is sorted, it will just take any steps. 19 00:01:30,180 --> 00:01:34,520 It doesn't matter whether they're given that is sorted or not sorted. 20 00:01:35,300 --> 00:01:42,810 OK, but my requirement is if the given that is sorted, I want that my finding the search operation 21 00:01:42,930 --> 00:01:45,930 should be done and Logan steps. 22 00:01:46,470 --> 00:01:53,670 OK, so this is my requirement that if the given that is sorted I want searching operation and Logan 23 00:01:53,670 --> 00:01:54,200 steps. 24 00:01:54,630 --> 00:01:55,860 So this is the requirement. 25 00:01:56,700 --> 00:02:00,030 OK, so it cannot search in log in time. 26 00:02:00,660 --> 00:02:04,560 It will do a linear scan, hence it requires insteps. 27 00:02:05,400 --> 00:02:10,320 So for login steps we have something called binary search. 28 00:02:11,400 --> 00:02:13,260 OK, so binary search. 29 00:02:14,550 --> 00:02:17,550 Well, Search and Logan Steps. 30 00:02:18,850 --> 00:02:25,810 And next, we do we will talk about how binary search searches for a given value and login steps. 31 00:02:26,920 --> 00:02:29,720 OK, so this is it for this video. 32 00:02:29,890 --> 00:02:30,520 Thank you.