1 00:00:01,810 --> 00:00:02,510 Hi, everyone. 2 00:00:02,530 --> 00:00:05,750 So today we are going to solve this problem partition list. 3 00:00:06,460 --> 00:00:09,330 OK, so the problem statement is very simple. 4 00:00:09,340 --> 00:00:11,170 We will be provided with the linked list. 5 00:00:11,170 --> 00:00:15,890 So input will be a long list and a value of X. 6 00:00:16,239 --> 00:00:19,510 So in this case, if the value of X history now, what is the problem? 7 00:00:19,510 --> 00:00:22,360 So the problem is very simple, but we have to do so. 8 00:00:22,360 --> 00:00:30,100 We have to partition this list in such a way that all the values which are less than X should come before 9 00:00:30,100 --> 00:00:32,750 the values which are greater than X. 10 00:00:33,640 --> 00:00:36,370 OK, so in this case, what will be our output? 11 00:00:36,550 --> 00:00:37,480 So one. 12 00:00:38,400 --> 00:00:43,410 Two and two, so there are these three values are less than three. 13 00:00:43,980 --> 00:00:47,000 OK, so one to two. 14 00:00:47,220 --> 00:00:53,550 So all these three values, they should come before the values, which are greater than three articles, 15 00:00:53,550 --> 00:00:53,940 two, three. 16 00:00:54,180 --> 00:00:56,720 So this is for this history and this is five. 17 00:00:57,420 --> 00:01:00,180 So for three and five, OK. 18 00:01:01,200 --> 00:01:08,190 So this will be my, let's see, less and less values and these are more values. 19 00:01:08,430 --> 00:01:13,610 OK, and what will be our output to our output will be we will make this a linked list. 20 00:01:13,650 --> 00:01:17,610 So one to two, and this is four, three, five. 21 00:01:17,850 --> 00:01:20,310 And then we will append this part. 22 00:01:21,000 --> 00:01:23,220 OK, so this should be our output. 23 00:01:24,560 --> 00:01:30,710 OK, and one thing you cannot change in order, for example, you cannot write like this two to one 24 00:01:31,340 --> 00:01:36,260 or similarly, you cannot write like you cannot start this part three or four or five. 25 00:01:36,530 --> 00:01:37,700 You cannot write like this. 26 00:01:37,730 --> 00:01:42,860 This is wrong because in the end, it is mentioned that we have to preserve the original order. 27 00:01:43,110 --> 00:01:49,200 OK, so what do you mean by preserving the original order so you can see for this coming before? 28 00:01:49,730 --> 00:01:53,030 So in the output force should come before three. 29 00:01:53,190 --> 00:01:56,060 Similarly, three is coming before five. 30 00:01:56,330 --> 00:01:59,270 So in the output, three should come before five. 31 00:01:59,450 --> 00:02:03,320 OK, so this is the meaning of preserving the original order. 32 00:02:04,070 --> 00:02:07,970 OK, so we are preserving the original order of the list. 33 00:02:08,780 --> 00:02:10,580 OK, so this is the question. 34 00:02:10,789 --> 00:02:18,320 So this question is present on little and here it specifies that we have to preserve the original order 35 00:02:18,320 --> 00:02:19,100 of the linked list. 36 00:02:19,260 --> 00:02:26,690 OK, so we will be given a value X and all the nodes whose value are less than they should come before 37 00:02:26,690 --> 00:02:29,000 the nodes whose values are greater than the X.. 38 00:02:29,480 --> 00:02:31,150 OK, and this is my order. 39 00:02:31,160 --> 00:02:36,170 So these values are less than X and these values are greater than or equal to X. 40 00:02:36,720 --> 00:02:43,190 OK, so we have to solve this problem and the expected time complexity is basically linear and the expected 41 00:02:43,190 --> 00:02:47,060 space complexities or an OK, so constant space and linear time. 42 00:02:47,710 --> 00:02:50,010 OK, so how we can solve this problem. 43 00:02:51,500 --> 00:02:55,090 So basically what we are trying to do here is so what we will do. 44 00:02:56,120 --> 00:02:58,040 So let's take about example only. 45 00:02:58,040 --> 00:03:03,530 So we have one, four, three, two, five and two. 46 00:03:03,980 --> 00:03:07,560 OK, so this is the example given on the code and the value of X history. 47 00:03:08,000 --> 00:03:08,990 So what I will do. 48 00:03:10,110 --> 00:03:14,010 I will I will separate I will partition this list into two parts. 49 00:03:14,260 --> 00:03:23,010 OK, so I will have less help, less deal and more head and more deals, more deals. 50 00:03:23,010 --> 00:03:26,590 So all the values which are less than X will come in this part. 51 00:03:26,640 --> 00:03:31,030 OK, so this is less than expected and this is go to the next part, OK. 52 00:03:31,050 --> 00:03:33,540 So this is more head. 53 00:03:35,000 --> 00:03:41,270 Basically, the head of the list, and this is Mortell, basically the tail of the linked list and some 54 00:03:41,600 --> 00:03:43,280 less head and less tail. 55 00:03:44,060 --> 00:03:46,430 So what we will do, we will iterate over the linked list. 56 00:03:46,490 --> 00:03:49,250 OK, so we will trade over this link list. 57 00:03:49,420 --> 00:03:51,060 Now, what we will do will compare the value. 58 00:03:51,080 --> 00:03:53,140 So compare one with three. 59 00:03:53,870 --> 00:03:55,010 So one is less than three. 60 00:03:55,010 --> 00:03:57,560 So it will be the part of the left hand side. 61 00:03:57,620 --> 00:04:00,190 OK, and initially all this will be null. 62 00:04:00,200 --> 00:04:02,830 Initially linked list doesn't exist. 63 00:04:02,840 --> 00:04:07,250 So all these are OK now one is less than three. 64 00:04:07,250 --> 00:04:10,070 So we know this will be the part of the left linked list. 65 00:04:10,250 --> 00:04:13,580 So it will one will come here and it will do so. 66 00:04:13,580 --> 00:04:15,800 Less head and less tail. 67 00:04:15,950 --> 00:04:17,970 Both will point towards one initially. 68 00:04:18,560 --> 00:04:20,959 Now we will compare four with three. 69 00:04:21,170 --> 00:04:23,600 OK, so four is good then three. 70 00:04:23,600 --> 00:04:26,450 So it will be the part of the right hand side more. 71 00:04:26,660 --> 00:04:36,200 OK, so four will come here and I will update my more head and more tail, then compare three with three. 72 00:04:36,500 --> 00:04:39,150 OK, so it will come in the right hand side. 73 00:04:39,170 --> 00:04:45,560 Now I have the option, I can write three here or I can write three here since we have to preserve the 74 00:04:45,560 --> 00:04:46,990 original order of the linked list. 75 00:04:47,270 --> 00:04:49,940 So this is wrong and this is right. 76 00:04:50,470 --> 00:04:56,660 OK, so basically what we are doing here is we are inserting at tail position. 77 00:04:56,690 --> 00:05:00,680 OK, so we are starting at tail position now. 78 00:05:00,680 --> 00:05:05,540 After the inserting modulo we will update our model so more tail will come here. 79 00:05:06,930 --> 00:05:13,650 OK, now compare to so obviously two will go in the right and left hand side, so two will come here 80 00:05:13,920 --> 00:05:16,490 and I will update my left bill. 81 00:05:16,500 --> 00:05:19,370 So left till then, compare five. 82 00:05:19,380 --> 00:05:23,370 So five will come here and I will update my Motyl. 83 00:05:24,840 --> 00:05:31,020 OK, now, compared to with three, so two will come here and I will update my left. 84 00:05:31,050 --> 00:05:31,350 Deal. 85 00:05:31,930 --> 00:05:32,250 OK. 86 00:05:33,650 --> 00:05:40,820 Now, when this is over, after reading of the linked list, what we have to do, so this tool will 87 00:05:40,820 --> 00:05:41,950 point towards food. 88 00:05:42,650 --> 00:05:49,840 OK, so basically what we have to do so the next off left bill, it should point towards the more ahead. 89 00:05:50,230 --> 00:05:56,170 OK, and now what we have to do, we have to return the head of the linked list, which will be lifted. 90 00:05:56,210 --> 00:06:00,280 OK, this will be our head of the NewLink list. 91 00:06:00,950 --> 00:06:08,630 OK, so this thing we have to do after my left, after my head and less tail more and more, all these 92 00:06:08,630 --> 00:06:09,740 four variables are ready. 93 00:06:10,400 --> 00:06:12,650 OK, now let's write this code. 94 00:06:12,920 --> 00:06:16,500 And while writing the code, they will be like few cases that we will handle. 95 00:06:16,570 --> 00:06:16,970 OK. 96 00:06:19,760 --> 00:06:23,180 So first of all, I have to create four variables. 97 00:06:24,210 --> 00:06:27,870 OK, so let's head, which is basically nil. 98 00:06:29,290 --> 00:06:31,030 Similarly, Lesterville. 99 00:06:33,450 --> 00:06:35,430 We need less deal, which is. 100 00:06:38,230 --> 00:06:41,500 We need more help, which is Mel. 101 00:06:43,620 --> 00:06:46,450 We need more detail, which is all tunnel. 102 00:06:47,730 --> 00:06:50,010 OK, so all my four babies are ready now. 103 00:06:50,060 --> 00:06:54,250 We have to do we will simply iterate over over the long list. 104 00:06:54,270 --> 00:06:54,460 OK. 105 00:06:54,480 --> 00:06:56,540 So while it is not a questionable. 106 00:07:00,120 --> 00:07:06,380 OK, now I have to decide whether this node will go in the last part or indeed more part. 107 00:07:06,420 --> 00:07:09,240 So if the value of a. 108 00:07:10,590 --> 00:07:15,730 Is less than X, so it will go in the left part now in the left part. 109 00:07:15,870 --> 00:07:20,280 I have to check first if the left have a constitutional. 110 00:07:21,380 --> 00:07:23,810 So we have to initialize our left head. 111 00:07:23,850 --> 00:07:28,340 OK, so we will initialize our left hand and we will also initialize our left. 112 00:07:28,790 --> 00:07:32,820 So they both will be OK and then they'll start. 113 00:07:32,900 --> 00:07:34,670 That means they have already been initialized. 114 00:07:34,880 --> 00:07:37,400 So I have to insert a detailed position. 115 00:07:38,240 --> 00:07:39,630 So we inserted Bill. 116 00:07:40,400 --> 00:07:44,240 So what we have to do, so will some do left in the next? 117 00:07:45,950 --> 00:07:49,610 It's basically a and then we will move the left. 118 00:07:49,940 --> 00:07:57,920 OK, so Lefty Licalsi, or you can also right left Bill Ecoles next of Lefty. 119 00:07:58,550 --> 00:08:03,260 OK, so you can write both now here what we have, what we have done. 120 00:08:03,500 --> 00:08:11,300 So I think you understood this part so initially, so initially left head and left in the boat were 121 00:08:11,300 --> 00:08:12,270 pointing towards Snel. 122 00:08:12,470 --> 00:08:14,870 So first of all, one will come here. 123 00:08:15,470 --> 00:08:22,220 So when one comes, I have to update both left and left elbow will be updated and once the left hand 124 00:08:22,220 --> 00:08:23,480 left, they are not null. 125 00:08:23,750 --> 00:08:27,110 Then I will insert at the tail and then I will update the left. 126 00:08:27,380 --> 00:08:36,590 OK, so this is how it is working and we have to do the same kind of operations with the right part 127 00:08:36,590 --> 00:08:36,960 also. 128 00:08:36,980 --> 00:08:40,460 OK, so in the early part. 129 00:08:42,210 --> 00:08:45,960 What we have to do, so I'm copying this part. 130 00:08:47,050 --> 00:08:48,760 We have to do some minor changes only. 131 00:08:50,530 --> 00:08:53,020 OK, so if the Moorhead. 132 00:08:54,220 --> 00:08:55,720 If the Morehead is null. 133 00:08:56,690 --> 00:09:01,190 So I will update my head and I will update my Mortell. 134 00:09:02,440 --> 00:09:07,750 Similarly, it should be Mortell and it should be Motyl. 135 00:09:08,880 --> 00:09:10,290 OK, now. 136 00:09:11,670 --> 00:09:14,510 What we have to do, so now we have to move ahead. 137 00:09:14,530 --> 00:09:17,070 OK, we are taking over the linked list. 138 00:09:18,210 --> 00:09:19,220 We have a while loop. 139 00:09:19,440 --> 00:09:23,010 OK, so we have this wide loop so far moving ahead. 140 00:09:23,010 --> 00:09:24,970 We have to read this line, OK? 141 00:09:25,260 --> 00:09:26,880 A quiz next of a. 142 00:09:29,810 --> 00:09:35,250 Now, once this Vilo is ready, will both left and right and they are ready. 143 00:09:35,300 --> 00:09:40,140 OK, so both left and both less and more, they are ready. 144 00:09:40,190 --> 00:09:42,440 OK, so let's. 145 00:09:44,830 --> 00:09:47,050 And the more linked list already. 146 00:09:49,240 --> 00:09:52,230 Now, what we have to do, we have to simply append them. 147 00:09:52,350 --> 00:09:54,490 OK, but we cannot simply append them. 148 00:09:54,500 --> 00:10:00,910 For example, let's say if my list is let's say one, two and three, and let's say the value of X is 149 00:10:00,910 --> 00:10:01,240 for. 150 00:10:01,450 --> 00:10:08,270 So in this case, my left hand will point towards one and this will be the scenario. 151 00:10:08,320 --> 00:10:13,600 This will be the left bill and more and more tail, they will be null. 152 00:10:14,160 --> 00:10:19,100 OK, so in this case, what we have to do, we have to simply return the left hand. 153 00:10:19,210 --> 00:10:21,940 OK, we will not do any like a band operation. 154 00:10:22,210 --> 00:10:24,070 We will simply return the left hand. 155 00:10:24,720 --> 00:10:28,950 OK, now that that case can be let's say I have five, six and seven. 156 00:10:28,960 --> 00:10:36,130 So if this is my list and the value of X is four, so in this case my left hand and left in the boat 157 00:10:36,130 --> 00:10:38,320 will be null and. 158 00:10:39,440 --> 00:10:46,790 My head will point towards the fife and my Mortdale will point towards the seven, so in this case, 159 00:10:46,790 --> 00:10:50,540 what we have to return to, in this case our output will be Morad. 160 00:10:51,170 --> 00:10:54,020 OK, in this case, this will be our output now. 161 00:10:54,020 --> 00:11:00,170 And if both the linked list exist, if both less and more likely to exist, then what we have to do, 162 00:11:00,590 --> 00:11:01,820 we will do this operation. 163 00:11:02,030 --> 00:11:08,230 We will append we will do this operation, and then we will return the Lassard, OK? 164 00:11:09,680 --> 00:11:13,520 So we have to handle some cases, so first case. 165 00:11:14,690 --> 00:11:16,160 Left link list exist. 166 00:11:17,350 --> 00:11:22,870 OK, and rattling list does not exist, so basically rated inconsequential. 167 00:11:23,560 --> 00:11:28,330 Now, in this case, we do not have to do any operation which we can simply read on the left hand. 168 00:11:28,570 --> 00:11:30,850 OK, now the elusive. 169 00:11:32,100 --> 00:11:36,110 In the elusive condition, Leaside does not exist. 170 00:11:39,260 --> 00:11:43,970 And right head exist, so basically this is Morad. 171 00:11:45,110 --> 00:11:47,150 OK, more exist. 172 00:11:48,580 --> 00:11:51,100 So Morad is not close to null. 173 00:11:52,440 --> 00:12:00,520 Now, in this case, we can simply return the more head now in the end sport, both less and more exist. 174 00:12:00,930 --> 00:12:03,450 So what we have to do, we have to first up. 175 00:12:03,450 --> 00:12:05,550 And so the next of. 176 00:12:06,910 --> 00:12:09,970 Left Bill less still, basically, this is more Moorhead. 177 00:12:11,160 --> 00:12:15,720 And then we can simply return less head. 178 00:12:15,850 --> 00:12:22,470 OK, now this is the complete completel, so if we will run this court, we will get time limit accelerated. 179 00:12:22,530 --> 00:12:24,000 OK, so let's see. 180 00:12:29,760 --> 00:12:31,720 OK, so this condition is wrong. 181 00:12:31,740 --> 00:12:36,660 Basically, it should be left held, less medicinal and more is not. 182 00:12:37,320 --> 00:12:39,980 Now, if you will, in this court, we will get it accepted. 183 00:12:40,290 --> 00:12:40,650 OK. 184 00:12:43,170 --> 00:12:44,730 So we are getting excited. 185 00:12:45,180 --> 00:12:52,020 Now, let's see, let's try to understand, because as we discussed our time complexities, basically 186 00:12:52,020 --> 00:12:53,390 we are not doing anything else. 187 00:12:53,400 --> 00:12:56,380 Our time complexity is linear and our space complexities. 188 00:12:56,580 --> 00:12:59,700 And then also we are getting the time limit exceeded that. 189 00:13:00,160 --> 00:13:03,710 Now we will try to understand why we are getting family tax related. 190 00:13:04,350 --> 00:13:12,180 OK, so so let's try another our for this input one for three and one. 191 00:13:12,210 --> 00:13:16,100 OK, and the value of Hexis three and we are getting there. 192 00:13:17,380 --> 00:13:20,430 OK, so our linked list is one. 193 00:13:21,530 --> 00:13:29,780 All three and one, OK, so this is our long list, and the value of X is basically three. 194 00:13:31,900 --> 00:13:34,130 OK, so what we have to do. 195 00:13:35,470 --> 00:13:40,630 So initially, my left leg had listed the anal. 196 00:13:43,330 --> 00:13:46,090 Morad Mortell, they are also NDL. 197 00:13:48,150 --> 00:13:50,910 OK, now we will trade over this long list. 198 00:13:51,090 --> 00:13:56,380 OK, so this is the value of a we will compare one with three. 199 00:13:56,550 --> 00:13:59,420 So obviously this will be the part of the last part. 200 00:13:59,700 --> 00:14:05,580 So I will update my less head and less so less head and less still. 201 00:14:06,090 --> 00:14:11,210 OK, so I will update my list, head enlisted and then I will move ahead. 202 00:14:11,460 --> 00:14:13,770 So this is a no, OK. 203 00:14:16,160 --> 00:14:23,060 Now we will compare four with three, so now this time this will be the part of Morsi, so I will update 204 00:14:23,060 --> 00:14:23,810 my more. 205 00:14:24,110 --> 00:14:31,180 So this is no more red and this is more detail and it will move ahead. 206 00:14:31,190 --> 00:14:35,630 So this is a now compared three with one, three with three. 207 00:14:35,870 --> 00:14:38,720 So obviously this will be the part of the motel. 208 00:14:38,870 --> 00:14:45,150 So motel room next is basically a and then I will update Mortell. 209 00:14:45,170 --> 00:14:47,810 So this is Mortell. 210 00:14:48,750 --> 00:14:54,550 Now, compare one with three, so obviously this will be part of left hand side. 211 00:14:54,720 --> 00:14:57,870 So what we will do so left tail I next. 212 00:14:58,470 --> 00:15:01,200 So left tail arrow next. 213 00:15:03,270 --> 00:15:09,010 It's basically and then we are updating our left bill, so left Bill will come here. 214 00:15:10,800 --> 00:15:18,570 OK, and then what we are doing, so we are doing a final part, so in this thing, both left and both 215 00:15:18,570 --> 00:15:20,040 less and more exist. 216 00:15:20,250 --> 00:15:26,630 So we did something like this left arrow next is basically more head. 217 00:15:27,130 --> 00:15:29,000 OK, so we did something like this. 218 00:15:29,250 --> 00:15:30,690 So this is my left bill. 219 00:15:31,560 --> 00:15:34,920 And what we are doing left Bill Arrow next is more ahead. 220 00:15:35,160 --> 00:15:37,050 So Left Arrow next. 221 00:15:40,370 --> 00:15:40,850 Is. 222 00:15:42,130 --> 00:15:49,410 Morad, OK, so this is Morad, and then we are turning the left less head. 223 00:15:49,460 --> 00:15:55,080 OK, so let's say this one, then one is pointing towards this one. 224 00:15:55,420 --> 00:16:02,260 So one is pointing towards this one, then this one is pointing towards the fourth, so one is pointing 225 00:16:02,260 --> 00:16:02,890 towards four. 226 00:16:03,190 --> 00:16:06,310 Then we can see four is pointing towards this tree. 227 00:16:06,550 --> 00:16:11,110 So four is pointing towards this tree, then three is pointing towards one. 228 00:16:11,350 --> 00:16:13,270 So tree is pointing towards left. 229 00:16:13,780 --> 00:16:19,480 So basically this is the left tail of trees pointing towards one and one is pointing towards three. 230 00:16:19,780 --> 00:16:21,070 Four is pointing sorry. 231 00:16:21,070 --> 00:16:27,340 One is pointing towards four, four is pointing towards three trees again pointing towards one and so 232 00:16:27,340 --> 00:16:27,520 on. 233 00:16:28,590 --> 00:16:30,170 OK, so this will go on. 234 00:16:30,190 --> 00:16:33,700 So basically what is happening here is this is a loop. 235 00:16:34,000 --> 00:16:36,550 OK, so this is a cycle in our linked list. 236 00:16:38,000 --> 00:16:41,610 So there is a cycle in our linked list now how to avoid the cycle. 237 00:16:41,860 --> 00:16:47,020 So for avoiding the cycle, we will simply write so. 238 00:16:49,290 --> 00:16:55,530 Now, once our lesson, more are ready, what we have to do, we have to make their next level, OK, 239 00:16:55,740 --> 00:16:58,080 so left till next. 240 00:16:59,700 --> 00:17:00,450 This is Nell. 241 00:17:03,460 --> 00:17:08,410 And simply what we have to do so Mortell do next. 242 00:17:09,849 --> 00:17:11,720 They are all OK. 243 00:17:11,950 --> 00:17:17,589 We have to OK, so we are making them and now our less and more are ready. 244 00:17:17,619 --> 00:17:18,790 Now let's on the cold. 245 00:17:21,660 --> 00:17:24,540 OK, so now our goal is Working Knowledge Summit. 246 00:17:28,540 --> 00:17:35,500 OK, so we are getting ready daym when our input Lesters and the value of Hexis zero and it is showing 247 00:17:35,500 --> 00:17:36,990 there is at at this point. 248 00:17:37,000 --> 00:17:38,950 Now let us try to understand what is the added. 249 00:17:41,340 --> 00:17:48,900 So initially, obviously, less and less still there and obviously more head and more tail, they are 250 00:17:48,900 --> 00:17:52,320 all tunnel, OK, since the list is empty. 251 00:17:52,350 --> 00:17:53,950 So this is our loop. 252 00:17:53,970 --> 00:17:55,930 So I will not go inside the wire loop. 253 00:17:55,950 --> 00:17:57,290 I will reach at this lane. 254 00:17:57,840 --> 00:18:01,500 So at this point, what we are doing next off left tail is null. 255 00:18:01,690 --> 00:18:05,070 OK, and basically left is already null. 256 00:18:05,940 --> 00:18:07,950 So basically what is the meaning of this line? 257 00:18:08,100 --> 00:18:13,080 We are trying to do something like this null arrow next is null. 258 00:18:14,320 --> 00:18:21,190 And basically, this will give us the segmentation fault now to avoid this error, what we can do so 259 00:18:21,190 --> 00:18:22,470 we cannot write like this. 260 00:18:22,990 --> 00:18:28,030 So first we have to check whether the last part existed or not. 261 00:18:28,180 --> 00:18:29,200 OK, so. 262 00:18:30,720 --> 00:18:39,720 We will right here, so if the last part exist, then first make the next point, then make the next 263 00:18:39,960 --> 00:18:42,130 left bill and then return the head. 264 00:18:42,150 --> 00:18:44,550 And similarly, we will do with this. 265 00:18:44,610 --> 00:18:44,990 OK. 266 00:18:46,830 --> 00:18:48,190 We have to right here also. 267 00:18:48,380 --> 00:18:50,910 OK, and similarly, despite. 268 00:18:54,890 --> 00:19:02,180 If the mortarboard exist, make the next null and similarly, if both exist first, make them null and 269 00:19:02,180 --> 00:19:03,170 don't do the operation. 270 00:19:03,200 --> 00:19:05,010 OK, now let's try to it. 271 00:19:08,440 --> 00:19:10,300 OK, so if the list isn't pretty. 272 00:19:11,290 --> 00:19:16,930 We are getting around Daym so we can handle one more case here. 273 00:19:17,090 --> 00:19:18,960 OK, so what will be the case? 274 00:19:20,720 --> 00:19:25,550 We have to end it like here, this is the case, so. 275 00:19:26,620 --> 00:19:30,250 Else, if if both the linked list exist, so if. 276 00:19:31,580 --> 00:19:33,610 Lassard is not close tunnel. 277 00:19:37,760 --> 00:19:45,770 And Morad is not closed, only then only we can do the following operations now in the L'ESPRIT. 278 00:19:49,610 --> 00:19:50,400 So we welcome. 279 00:19:51,230 --> 00:19:52,970 We will reach this line on live in. 280 00:19:54,230 --> 00:19:58,610 Neither the last part exist, neither the mortarboard exist, basically when the list is empty. 281 00:19:58,640 --> 00:20:00,870 So in this case, we cannot handle OK. 282 00:20:01,880 --> 00:20:02,800 Not at summit. 283 00:20:05,000 --> 00:20:07,880 OK, so now our court is 100 percent correct. 284 00:20:07,940 --> 00:20:10,360 OK, so this is the complete quote. 285 00:20:10,370 --> 00:20:11,570 I will share the court with you. 286 00:20:12,400 --> 00:20:18,350 OK, so if you have any doubt in this question, you can ask me, OK, so the time complexity of our 287 00:20:18,350 --> 00:20:21,950 solution is linear and this is complexities or an. 288 00:20:22,700 --> 00:20:24,290 OK, thank you.