1
00:00:00,080 --> 00:00:01,010
Welcome back.

2
00:00:01,010 --> 00:00:07,850
Now let's try to think of the space and time complexity for the greedy approaches that we have discussed.

3
00:00:07,850 --> 00:00:14,180
So when it comes to the time complexity for the greedy approach one as well as the greedy approach,

4
00:00:14,180 --> 00:00:21,560
number two, the time complexity is going to be of the order of n because we are just making one pass

5
00:00:21,560 --> 00:00:23,060
through the input array.

6
00:00:23,060 --> 00:00:23,420
Okay.

7
00:00:23,420 --> 00:00:28,490
So that's why the time complexity of these solutions is of the order of n.

8
00:00:28,490 --> 00:00:33,860
And when it comes to the space complexity, it's going to be of the order of one because we are not

9
00:00:33,860 --> 00:00:36,050
using any auxiliary space.
