1
00:00:02,170 --> 00:00:03,790
Hey, guys, what's up?

2
00:00:04,360 --> 00:00:09,130
So in the last video, we learned what is a linear search.

3
00:00:09,730 --> 00:00:14,440
So in this video, we will learn what is the problem with the linear search.

4
00:00:14,950 --> 00:00:16,780
So the problem is very straightforward.

5
00:00:17,320 --> 00:00:20,120
So what was the time complexity when I should say.

6
00:00:20,500 --> 00:00:21,730
How many number of steps?

7
00:00:21,760 --> 00:00:22,710
Leanness stake.

8
00:00:23,140 --> 00:00:27,580
So it takes any number of steps to find the key in an area.

9
00:00:28,510 --> 00:00:28,780
Okay.

10
00:00:29,090 --> 00:00:35,200
So if you have an unsorted eddy, it is taking any steps to find the key.

11
00:00:35,800 --> 00:00:42,190
If you have a certain area, then also it is digging and steps to find the key.

12
00:00:42,490 --> 00:00:42,820
Why?

13
00:00:43,060 --> 00:00:44,160
Because linear.

14
00:00:44,170 --> 00:00:48,070
So it just perform a linear scan of the eddy.

15
00:00:48,520 --> 00:00:49,900
So leanness search.

16
00:00:49,990 --> 00:00:53,110
Just perform a linear scan over the area.

17
00:00:53,560 --> 00:00:59,740
It is not using the property that the given array is sorted or the given area is unsorted.

18
00:01:01,300 --> 00:01:10,320
OK, so if the given it is sorted, then I want that my time complexity should be log and number of

19
00:01:10,320 --> 00:01:11,620
steps should be long.

20
00:01:11,720 --> 00:01:13,530
And so this is my requirement.

21
00:01:14,640 --> 00:01:14,960
Okay.

22
00:01:16,380 --> 00:01:23,310
So the problem with Línea, so it is that it is not taking into consideration that whether the given

23
00:01:23,310 --> 00:01:29,850
area is unsorted or whether the given area is sorted, it will just take any steps.

24
00:01:30,300 --> 00:01:34,530
It doesn't matter whether they're given that is sorted or not sorted.

25
00:01:35,420 --> 00:01:35,680
OK.

26
00:01:36,120 --> 00:01:39,330
But my requirement is if they're given that it is sorted.

27
00:01:39,470 --> 00:01:45,960
I have warned that my finding the search operation should be done in Lovgren steps.

28
00:01:46,570 --> 00:01:46,850
OK.

29
00:01:47,160 --> 00:01:54,240
So this is my requirement that if the given area sorted, I want searching operation and Logan steps.

30
00:01:54,690 --> 00:01:55,830
So this is the requirement.

31
00:01:56,750 --> 00:01:56,990
Okay.

32
00:01:57,140 --> 00:01:57,410
Lena.

33
00:01:57,420 --> 00:02:00,030
So it can not search in log in time.

34
00:02:00,780 --> 00:02:04,590
It will do a linear scan as it requires and steps.

35
00:02:05,460 --> 00:02:10,240
So for Logan Steps, we have something called Binary Search.

36
00:02:11,530 --> 00:02:13,290
OK, so binary search.

37
00:02:14,640 --> 00:02:17,550
Well, Search and Logan Steps.

38
00:02:18,970 --> 00:02:25,840
And next, we do we will talk about how binary search searches for a given value and Logan steps.

39
00:02:27,180 --> 00:02:29,740
Okay, so this is it for this video.

40
00:02:29,950 --> 00:02:30,550
Thank you.
