[00:00:00] My question is regarding the assignment one. So, in the lab, as I mentioned, there are total four assignments and assignment one marking will be from there. So, my confusion is like, will we also be having a separate assignment, like this kind of assignment also, or the only one to four lab will be counted in our assignment one? [00:00:22] so there will be separate assignment for lab okay and the things which we are doing in the lab is [00:00:30] totally for practice basis but in the last if some marks is demanded from my side what you [00:00:36] have do the assessment in the lab then i will show that marks so that they can add okay otherwise we [00:00:42] will have a separate quiz yeah those those questions are only for practice it will not be [00:00:48] be counted in assignments so that is a lab kind of thing is of evaluation what i'm making so at [00:00:54] last sometime they ask you uh share me your assessment see so they take it and and may be [00:01:01] added in your marks okay whatever is beneficial if you do well in quiz then that marks is not [00:01:07] added if you not do well then that marks are added oh okay okay thank you so much [00:01:12] jivan i guess we can start yes sir you can go ahead thank you thank you thank you okay so uh [00:02:01] let us begin this class so in uh yesterday's lecture we were covering the topic primarily [00:02:08] the binary search binary search and just finish a merge sort and the last we have seen quick sort [00:02:31] okay so in most sort we identified that it is a recursive division a recursive division of a large [00:02:41] problem okay division of a large problem and one more thing we identified that it required [00:02:51] additional space for storing result as well and we calculated the computational complexity to be [00:03:02] n of log of n for all three cases of the best worst and average case okay [00:03:08] Bandly search is also following the recursive division and comparison with the middle element. [00:03:15] And here we form the computational complexity of order log of n with a condition that the array should be always sorted. [00:03:24] Array should be sorted. [00:03:32] Then we have quick sort. [00:03:34] We have started and what we found that for average and best case, the computational complexity [00:03:41] was as equivalent to the merge sort forward, worst case the complexity reaches to the n [00:03:49] square where the thing is every time the pivot is selected as the extreme element. [00:03:54] pivot is the smallest or largest element in each iteration okay so then it becomes the worst case [00:04:19] then we identified that quick start mechanism is uh simple just identify a pivot and fix its [00:04:27] position okay so what is the rule that by what should be greater than left and [00:04:34] should be less than right so what algorithm did it initially start and go [00:04:42] from left to right that is left equal to left plus one at any instance if it [00:04:48] found this condition is not fulfilling then it again change its direction so [00:04:52] simple thing is that I will start from left then go to right and if a [00:04:58] condition fail then I will change my direction towards left okay so this [00:05:05] discontinue till left index is less than or equal to right index okay if this [00:05:16] condition fail then we will out of the loop and our algorithm will terminate [00:05:20] Then we discuss one more important thing that is selection of the pi-watt, okay. [00:05:34] So there was a question called selection of pi-watt, so what we find we can go for first [00:05:47] element, we can do with the last element, we can go with the median element, okay. [00:06:09] And fourth one that we can do with a random selection. [00:06:20] So all these cases may lead to worst case, may lead to, not exactly, I am saying 100%, [00:06:31] may lead to worst case scenario. [00:06:37] So, to mitigate the worst case formation or we can say that to reach out to the recurrence relation of form Tn equal to 2t n by 2 plus order of n means that we are getting what? [00:07:01] if the problem is exercise 10 so we should get 5 and 5 okay so this is the [00:07:09] place of pivot okay so this is the recurrence relation for quick shot okay [00:07:19] but it is not applicable in case of worst case because in worst case what is the [00:07:23] situation t n equal to t n minus 1 plus some 1 okay and order of n then t then what basically [00:07:41] happening t and yesterday we have seen t n minus 1 plus 1 then it is equal to t n minus 2 plus 1 [00:07:50] plus 2 then it is equal to t n minus 3 and so on so what basically happening extreme cases okay [00:07:58] So, to mitigate all such difficulty, there was a mechanism introduced that is called as the median of 3. [00:08:08] Median of 3. [00:08:11] The algorithm is called as the median of 3. [00:08:14] So, let us explore a little bit about that. [00:08:16] Then we will start one of the interesting problem in divide and conager. [00:08:20] That is called as the maximum sum error. [00:08:30] Maximum sum error. [00:08:31] okay so we'll see this burst this median of three then we will start maximum sub [00:08:38] and so before going for that discussion here it is written what about the small [00:08:48] array a small array means that let's say we are going to see the size is 5 or 10 [00:08:52] and we are applying quick sort so what will basically happen you will never [00:09:01] witness a reduction in clock time it is maybe in few milliseconds okay two three [00:09:10] milliseconds there will be difference because we are dealing with a small area [00:09:13] but we have to perform multiple operations so why not to choose insertion [00:09:21] sort for a small set of element okay why not to choose insertion sort for a [00:09:34] a small set of element okay so now this is important so for very small array quicksort [00:09:46] does not perform as well as insertion sort because we will divide then we will select a [00:09:53] pivot then multiply five would will be selected and in in in contrary in the quicksort can [00:10:00] do our job okay and does not use quicksort recursively for a small array [00:10:06] So, using a sorting algorithm that is efficient for a small array such as insertion sort. [00:10:12] Okay. [00:10:13] So, when using quicksort recursively, switch insertion sort. [00:10:17] So, this is a variant. [00:10:19] Okay. [00:10:19] So, we are applying quicksort fine. [00:10:21] That is working. [00:10:22] But if the size of array is small, then we will recursively call what? [00:10:26] Insertion sort. [00:10:27] So, this version is called quick come insertion. [00:10:39] Where when array size, we can set anything. [00:10:41] array size is less than or equal to 5 what we will do we will go with the insertion sort. [00:10:49] Okay so the main aim of the algorithm if you remember in quicksort was dividing a large problem [00:11:04] problem into a small and we were setting a condition that if its size is less than or equal [00:11:11] to 1 if size of array is less than or equal to 1 then we were saying we are at the base case [00:11:18] or we stop but now when i saying these variants we would say that when array size is less than [00:11:27] or equal to 5 then we will stop and directly apply insert and so on okay so if you visualize [00:11:34] just a minute if you visualize so let's say we have an array of size something 20 then we will [00:12:02] apply quicksort assuming the worst case is not there in one partition let's say we are getting [00:12:08] 8 and in another partition we are getting well then here it is further divided and what we may [00:12:16] form a size of array 5 a size of array 3 okay so here what will happen maybe we [00:12:26] will get a seven and another will be of five so when we get a five or less than [00:12:33] five what we will do we will immediately called insertion sort here we'll [00:12:38] immediately call insertion sort on this part as well [00:12:43] We will call insertion sort on this part. [00:12:49] Sorry, on this part. [00:12:51] For 7 part, insertion will not be applied. [00:12:53] For this, insertion will be called. [00:12:55] And for 7, it is further divided into 3 and 4. [00:13:00] Then we will make an insertion call over here as well. [00:13:05] Okay. [00:13:06] So, what we found, now one can say, sir, you are saying, quick sort is taking n of log [00:13:13] of n and you are repeatedly applying n square thing algorithm okay so so how could this could [00:13:23] be better so this is better because we are dealing with just few number let's say size was 20 and we [00:13:31] are dealing with one fourth size n by four then we are applying what quick shot okay so the number [00:13:37] n square is not very big because we are already four times lower than the maximum number of [00:13:44] element okay so the clock time difference will be very less okay so and [00:13:50] computational requirement will be as per the algorithm requirement of quick [00:13:57] sort and insert and sort and we also know that when the sub the arrays fairly [00:14:03] sorted so insert and sort performs where it will tend toward its base case a [00:14:07] best case okay so that could be a scenario so this algorithm is called [00:14:12] quick come insertion become insertion I hope you people can visualize how this [00:14:28] can be done so just you have to change the base case okay the base case means [00:14:33] that the content you can see base case I mean I'm saying base case so primarily [00:14:40] we are seeing the stopping criteria of recursion stopping criteria of the [00:14:55] recursion okay so now you know as we have discussed partitioning part okay [00:15:09] from the algorithm of median of three median of three is a strategy of our [00:15:21] selection in quicksort [00:15:31] And it avoids the worst case, reducing the computational time requirement by 14 plus. [00:15:44] Okay. [00:15:45] I am taking a break of 2-3 minutes and then I will resume to attend a call. [00:15:52] So, partition that we have seen, median of 3 strategy, that is, [00:16:00] a of left less than pi volt and a of right greater than pi volt okay so [00:16:08] these are the pathway where we are going to choose the pi volt okay so so the basic strategy [00:16:23] that we have adopted in median of three basic strategy that we adopt that is pi volt this is [00:16:37] left and this is right okay so these are the strategy and the that we were following and [00:16:51] if you talk about the median of three so basic idea that we already have done low that is the [00:16:57] first index should be less than median should be less than high that is the last index so just [00:17:03] these three indexes are there and what is the thing here we have to maintain this order [00:17:09] key this must be lower this must be middle and this must be highest just a [00:17:15] minute take a call median of three strategy was we will pick three element [00:17:25] that is the first index last index and median index and arrange them in order [00:17:30] that such that first less than median less than last okay and when this is [00:17:37] done then we will replace median width second last element and that will act as [00:17:45] a pivot and then we will start our operation of the quick shot okay now [00:17:52] going ahead there's a question okay that I have started when I was starting the [00:17:58] quick sort why quick sort is faster than much so okay so already we have [00:18:07] discussed a little bit that already we have discussed a little bit that and due [00:18:15] to external memory requirement requirement the quicksort is faster okay [00:18:36] so let us see other regions as well so the inner loop consisting of an [00:18:46] increment or decrement by one which is faster a test and a jump okay if you can [00:18:56] see in I would selection there is no problem if say we are talking about the [00:19:03] first element as power and our aim is to fix the position of pi one okay not [00:19:10] comparing one one element label if you see in case of most of what we were [00:19:15] doing s1 and s2 were there and this is compared this is compared and compared [00:19:19] and then much and here we are although we are making comparison but we are just [00:19:24] confining around a single element placement and here we were confining [00:19:27] about the entire array comparison and then sorting in the order okay there is [00:19:35] no extra juggling in much stuff that okay so this is the inner loop that we [00:19:43] were discussing about okay and one more thing that is of course will be the [00:19:49] external memory requirement or the caching requirement okay so that is not [00:19:53] there in case of quicksort okay so now if we just simply want to do the analysis of the quicksort [00:20:07] what we can say that a random pivot that is no median of three partition no cutoff of the small [00:20:13] array to make it simple if run the s is zero or one then return the base case or pick element v [00:20:21] in s called the five of okay so that already we have discussed so that will be the two partition [00:20:27] 1 will be the this will be the pivot whose position is now fixed after each iteration [00:20:33] so pivot selection time will be of course what order of 1 okay if you select the first element [00:20:43] median element or last so it will be order of n if you do median of 3 so only 3 comparisons [00:20:48] are happening so it could be as equivalent as order of 1 3 comparisons in median of 3 [00:21:00] okay partitioning is linear time order of n because we can do maximum of n [00:21:07] comparison and running running time of two recursive con that is important so [00:21:12] this is the structure the algorithm should follow t i t n i i minus 1 plus [00:21:18] c n okay this is how in worst case we will reach to the computational [00:21:27] complexity of order of n square. So, this is this. Okay. So, this is just one element. [00:21:37] One element or we can say one extreme element is selected. And this is the best case scenario [00:21:52] where we are getting two equal partition in nearly all steps. Okay. But there is no such [00:22:08] mechanism to exactly identify the middle element always okay if this scenario could be possible [00:22:17] every time the pivot selection is the middle element middle element does not mean that it [00:22:23] should be the median element it is the element that is appearing every time as pivot in the [00:22:29] middle of the array sub array and sub sub array okay in that case only the computational complexity [00:22:35] will reach toward n of log of n okay so if you go back to this slide so pivot selection order of one [00:22:45] even it is median of three it is order of three you can say just then partitioning order of n [00:22:52] and we can say for recursive division it could be what log of n so we combine all then we will [00:23:01] have n of log of n but this is for best case for worst case what will happen [00:23:09] pivot selection order of one then we are doing the partitioning that is order of [00:23:19] n and this is a recursive call here if you talk about pivot selection partition [00:23:24] and recursive call so what we will get order of one fine [00:23:31] partitioning order of n and recursive call will again order of n so [00:23:35] ultimately what we will get n square rather than getting log of n because [00:23:39] recursive call is making for all n entries when we have chosen a pivot that [00:23:44] is extremely small in each step so these are the two things so I hope quick [00:23:52] sort is easy to go I've already given the pseudo code of the quick sort you [00:23:57] people have understand the concept how actually it is working simply select [00:24:01] pivot move from left to right if there is a violation that left element is less [00:24:06] than pivot then we will change the direction and this will continue to [00:24:10] selection of all the pivot and sorting of the array now let us begin an [00:24:18] interesting problem in divide and conquer that is called as the maximum [00:24:22] summary problem okay so there is a company named volatile chemical [00:24:30] corporation okay and it is a share market listed company the market listed [00:24:40] company and its share are also volatile chemical corporation is rather volatile [00:24:50] okay so so share means that let's say some days price was hundred some date is [00:24:55] hundred and twenty some date is 75 and so on so this could be the trend of the [00:25:00] share value okay now there's a condition there is a condition that is to buy one unit to buy one [00:25:09] unit of stock only one time and then it can be sell on the letter date so that means that i will [00:25:15] if i buy on 11th of september so i cannot sell it on 11th of september i will sell on 13 12 anything [00:25:21] okay after the closing of the trading of the day trading day closing is allowed so that is mostly [00:25:30] happening in uh share market as well today also but just it is not applicable for the intraday [00:25:37] stock prices like i hope because most of you are from this fintech company so you know better than [00:25:46] me okay now we are not going into that stuff we are just going towards a problem okay so to [00:25:53] compensate the restriction you are allowed to learn what price the stock will be in the future [00:25:58] But here I am clearly saying we will not apply any ML technique. [00:26:05] So, what you will do, our target is to buy the share at lower price and share it as the highest possible price. [00:26:13] Okay. [00:26:15] So, this is the primary objective. [00:26:18] But here when to enter and when to exit. [00:26:21] So, that is, so let's say we have a trend of the share of last year. [00:26:25] year then we can follow that in the month of october the sale price was on the lowest and in [00:26:31] the month of december we are getting the highest profit okay so if you see the curve so let's say [00:26:38] this this this could be a curve for uh some duration if i say um from 30th september [00:26:49] to 16 october this could be the scenario okay of 2025 now we are going to trade in 2026 [00:27:00] i'm not going to apply any ml technique so what we found that it was someday it was 100 it was [00:27:06] then 113 then 110 then the least price that the share could go was 63 even 63 then on some date [00:27:14] is going what 9401 so if I buy the CR on 7th and sell on 11th if you can check so we will get the [00:27:24] highest profits margin that is the minimum that is the requirement of a user that or or you can [00:27:30] say that the user one okay so then if you see so now what actually i want what we need to ask so [00:27:47] what it is least buying price and max selling price okay so if we have these [00:28:06] set of values let's a 1780 number and we have to identify the entry and exit date [00:28:12] so basically what we are trying to do we are trying to do NC2 where n is the [00:28:17] total number of day and we have to identify those two day and if you realize what actually we want [00:28:22] so initially let's say we say that profit is zero next day the profit is 13 if you can see this 13 [00:28:34] minus 3 minus 25 20 minus 3 16 minus 23 18 and so on so basic our target is to identify the highest [00:28:46] possible very odd or maximum summary that we want to identify maximum sub [00:29:00] array whose sum is highest okay so if or in other word if I can say I had a set [00:29:10] of number having both positive and negative as well having both positive [00:29:15] and negative as well I want to identify a sub array whose sum is highest I want [00:29:20] identify a severity whose sum is eyes therefore it is called as the maximum [00:29:24] maximum severity maximum some severity okay that we we are seeing for this okay [00:29:32] maximum some sub any okay this is the maximum some severity okay so I hope the [00:29:55] problem is clear. We have an array of any size n that is containing both positive and negative [00:30:03] number. If all are positive, so maximum subarray is what? Sum of all the element. If all are [00:30:10] negative, the maximum subarray will be the least, will be just one number that is having the least [00:30:17] negative value okay so just giving you a glimpse of the problem so here we had an array that is [00:30:36] 13 minus 3 minus 25 okay 20 minus 3 20 minus the dot dot dot so on okay so if all the elements [00:30:53] or positive and what we can conclude the summit no need to do any maximum salary [00:31:04] anything if all the elements are negative and what we will choose the [00:31:19] smallest negative choose a smallest negative just a simple negative value [00:31:27] that is having the smallest negative means that or you can say not as [00:31:33] smallest the negative so let's say minus 1 other minus 20 so I will choose minus 1 and declare it [00:31:40] is maximum sum okay so because in negative we keep on adding that the negativity will increase [00:31:47] so we will try to choose the least number with negative sign or what we can say in this case [00:31:56] we will select the least number with negative sign. [00:32:13] Simple. [00:32:13] Don't confuse. [00:32:14] We will select the least number with negative sign. [00:32:20] Okay. [00:32:21] Just picking a call. [00:32:22] Maybe two, three minute break. [00:32:24] Again, I'm taking. [00:32:25] Actually, we are having the exam duty of the regular. [00:32:27] Good morning. [00:32:29] So, my doubt was when you say that PuigSort is faster than MergeSort and you told that in the worst case scenario, right, PuigSort is taking n square and the MergeSort is taking n log n. [00:32:44] So, how will it be the faster, how we can say that? [00:32:47] So, the worst case will rarely appear, okay, assuming and we are not comparing on the worst case. [00:32:53] Okay, of course when we do a worst case comparison, then your merge sort will be better than that of quicksort [00:32:58] But but we are not assuming is someone will provide us already sorted array for doing a sorting [00:33:10] Any other doubt to anyone [00:33:12] Otherwise, I said I have [00:33:14] Yes, I have said please. So what else what we are doing and numeric data now suppose you're doing some these things data source and search [00:33:20] So, what will happen if we convert into ASCAI character and then do the sorting or some other thing on the background we can do to increase performance? [00:33:29] That is my question. [00:33:30] So, here we are primarily talking about the numbers. [00:33:33] So, in case of, let's say alphabetical or later, so that, of course, you will convert into ASCAI code and whatever the number will appear. [00:33:41] Like for A, B, C, D, there are different numbers, 63 something. [00:33:45] for smaller number it's around 90s and something so accordingly we will do the sorting okay and [00:33:52] of course for a the number will be lower and for z the number will be higher so that is also there [00:33:57] so so this scheme is applicable as well just we have to convert into its equivalent let's [00:34:02] say binary equivalent or something and then we will perform the sorting any other doubt [00:34:16] so basically on the array which you have on the screen it has the negative values on both the [00:34:26] sides like opposite sides actually right so which particular you can say median side it will be [00:34:33] taken at all in this case because the not median we will select the sub array that is getting [00:34:39] you the highest values for example here if you can see so if i'm not wrong so there is only one [00:34:44] possibility that i will choose i will enter before 13 and exit after 13 that is the maximum [00:34:50] possibility otherwise we are having 20 as well or sorry we can take 20 not 13 because 20 is the [00:34:56] highest positive number and other thing if i add so it become more negative so i will choose 21 [00:35:01] and let's say the situation is 20 minus 11 and 25 so this will be the severity i will enter on this [00:35:07] day and exit on this the profit will be maximum so it can be either side of that uh lower [00:35:13] negative number will be there with negative number will be in between in between yeah [00:35:28] because i then and your team yeah good morning sir am i heard of it yes yes you're on so um so [00:35:38] for maximum survey you have uh like we are using a quick sort and there is also no no no before [00:35:44] maximum survey we will do a separate algorithm it is not a quick sort variant okay so so the question [00:35:49] is that given a problem like how do we identify that which algorithm or which solution we should [00:35:55] apply for that problem there is a dedicated algorithm when i'm asking about sorting so you [00:36:03] can use insertion merge or quicksort depending upon the number of the element and how the elements [00:36:08] are it is they are fairly sorted sorted or not sorted at all or the size of the element if it [00:36:14] is let's say 10 20 30 we will go for insertion if it is very large then we will go for quicksort [00:36:19] and more sort if your memory is a constant then we will definitely go for quick sort so that kind [00:36:24] of things we have to assume okay and some one one last question so there is also a problem called [00:36:31] balance sub array so is uh so maximum sub array and balance sub array are same kind of question [00:36:36] and same solution will be applied for both uh i have to check but uh but probably that will be [00:36:43] different concept balance of error is not getting the maximum sum okay so so that that i will if you [00:36:50] want i will discuss separately but this one is interesting because it is uh having three form [00:36:55] solution that is brute force uh divide and conquer as well as the dynamic programming variant okay [00:37:01] so complexity uh varying from n squared analog and n so all three cases are here okay so with [00:37:07] that that for this problem is interesting because we can solve by the three methods [00:37:11] and other that balance are very i will check it out and and if i had something then i will say [00:37:16] it as well okay thank you sir yeah good morning sir we can use dual pivot in the quickshot [00:37:37] so dual or trial or you can say four five but that is applicable when we are going for a [00:37:43] so there is a subject called path like this is designing an analysis of algorithm so there [00:37:48] there is a subject that is called parallel analysis of algorithm. [00:37:51] In that, we will try to parallelize this algorithm. [00:37:53] So, in that case, you will see that the sub-problems are treated separately [00:37:57] or different processors where you have to choose multiple pivots. [00:38:01] So, let's say one partition I'm doing with a pivot, [00:38:04] then I'm doing multiple pivots selection. [00:38:06] So, that is efficient only when we are going for a parallel variant of the quicksword. [00:38:10] In sequential, you can choose multiple pivots, multiple places, [00:38:13] so they will execute in a sequential order. [00:38:15] So, that will not be much beneficial, I guess. [00:38:18] okay so but there is a parallel variant of quicksort so you can refer the parallel analysis [00:38:24] of algorithm or you can identify so you will get it there multiple pivot selection is allowed [00:38:29] yes predefined sort methods are used dual pivot in quicksort [00:38:35] in java and other languages so maybe they are doing some sort of parallelism but we are not [00:38:44] aware of or if you are working then you know well okay okay so i hope the questions are done [00:38:57] um there are three variants okay so for example this is the severity we have to identify the [00:39:04] maximum severity so brute force algorithm we will try what we will try to form all the combination [00:39:08] okay we will try to form all the combination and among that combination whichever giving you the [00:39:14] highest sum we will pick. Okay. Just a minute. Today, there are some certain disturbance. [00:39:25] Finish one part of it. That is the brute force mechanism for solving the maximum severity [00:39:30] problem. Okay. So, let us see an example. Then we will come back again. So, let us say we have [00:39:36] this question. Okay. Where we have the elements at indices 1, 2, 3, 4, 5, 6 and 7. Seven elements [00:39:46] are there so basically what we will do in step one i will just pick one element okay then i will [00:39:53] add these two so what i will get minus four then add this one then i will get minus five then adding [00:39:59] three what i will get minus two then adding minus one minus three then adding two minus one then [00:40:08] adding this minus three so highest among this is what two then in step number two what i will do [00:40:14] I will start with the second index that is minus six minus seven minus four minus five minus three [00:40:21] minus five maximum is how much minus three okay so then in third iteration we will start with [00:40:32] the third index okay so in brute force the problem is that irrespective of the available [00:40:37] solution we will explore all possible okay so that is minus one two one three [00:40:47] then minus one so maximum among this is how much maximum on this will be three [00:40:54] then fourth one will start with the fourth index three two four two so it [00:41:04] maximum is four then fifth we will start with minus one minus one one minus one so maximum is [00:41:16] four then in sixth we will start with the this location two zero maximum is two and the seventh [00:41:25] index will be of course last that is minus two and minus two what we identified this is the highest [00:41:30] four and four is highest when when we are adding three one and two so the maximum severity [00:41:36] solution for this is index number four to six and this is brute force mechanism simple we will in [00:41:42] brute force we have to check all the possibilities and among which which and whatever be the highest [00:41:47] we will pick and give as a result we will pick and give it as a result so that is happening here as [00:41:54] well okay so just removing this okay so this is the thing so maximum if you can [00:42:09] see the maximum sum that we have bought is four so this is this will be the [00:42:13] result and it is appearing when we are starting with index number four and [00:42:19] reaching to the index number six okay so this is the result so this mechanism is [00:42:25] brute force but what we will see we will see run one loop for a row and one root [00:42:30] for column so the complexity will be just what order of n square okay if you [00:42:34] see the algo stuff so this is looking like this so to for loop running for n [00:42:42] times so complexity will be n square and complexity will be n square okay so now [00:42:52] So if you see in maximum sum array, there are three possible solutions. [00:42:57] This one was brute force. [00:42:59] There is another variant that is called divide and conquer that already we are covering. [00:43:04] And the third variant will be the dynamic programming, dp. [00:43:12] So in brute force, we are checking all possibilities. [00:43:18] Here we are reaching to the computational complexity of order of log of n. [00:43:22] And here, if you surprisingly see, it is order of n only. [00:43:26] So, this is the best approach. [00:43:28] But the drawback of this one is what? [00:43:30] The drawback of this one is, the drawback of this one is that it required memory to [00:43:40] store previous outcome. [00:43:48] Okay. [00:43:48] So, using that, it is, on the top of it, it is working. [00:43:51] And the algorithm that is known in this is called as the cadence algorithm, famous one. [00:43:55] cadence algorithm okay so check it out cadence algorithm for dynamic program [00:44:02] okay so okay so yeah what I will do divide and conquer algorithm we will see [00:44:26] in the next class and I hope you people had received assignment one for assignment [00:44:33] to the syllabus will be till maximum summary so which I'm just writing clearly till maximum [00:44:47] summary till maximum summary and brute force one okay whatever I will taught in the next [00:44:56] week that will not will be the part of your assignment to okay so I hope you people have [00:45:03] receive assignment one soon you will also receive assignment two so that will [00:45:07] be till brute force mechanism of maximum survey area okay so now I'm closing the [00:45:12] class early closing because I have to go for a exam duty today and we'll meet [00:45:17] next week [00:45:20] as he's is having a query I will take it those who have done can leave the [00:45:24] meeting and I will take few queries then then I will close the session