So, what is in longest common prefixes, there will be an array of strings. Okay, so let's say, in the array, there will be strings like, there are three strings, let's suppose, flower, flow. no i didn't say this yeah i didn't say my screen i'll i'll say i'll show my screen okay you know it is introduced one view dictionary keyword reverberating i can't heard of this is it is this voice is like breaking or like fine now hello it's clear oh no but i'm gonna i'm not saying my screen there is a spam of clear now clear now voice is okay okay and then i'm starting okay so there is an input of a strings okay like uh flower flow to it okay so let's say in the area there are three strings okay and then output will be the affiliate okay okay it's fine now so so problems all right see don't go look into this okay look into this or the end of this okay look into this pillow only focus on this to take it so how i am solving i'll like from the lead code or those things so last time somebody asked in the last like about to end he asked like there are so much of things like lgpt cloud all these things right so how effectively we can solve okay right so if you have any idea right let's say i have no idea i have to solve a different approach trigger you know it's different approach let me solve it this way if that looks good then you move forward with that so how i was solving from the network is there is not a like a recommendable approach okay solving that approach only via dv and saying okay uh this problem is name is longest form of 57 i'm taking time sorry so uh first i thought like i approach off so let's say the problem is like which is the longest one in the string okay so let's say fl is longest right fl ow is longest in this two strings but when it comes to flight whenever it matches okay then it will fail it will say like only up to the fl only the longest strings in this three correct so that's what it giving a fill if there is no any string matchable even not in even single letter okay then it will uh then it will expected output will be like this okay empty string okay so uh first i thought like a can we take one has map take care uh like store those things okay we can take one has map okay and we can my f compare i i already compared the f okay so f is never seen right so i'll take that and i will keep in a uh like value okay sorry and the key even okay and i'll take one count okay i'll keep it there okay and second if it it seen this okay f okay i already seen this app here okay then i'll increase the count okay so our count is already increased okay then i'll take that and think then i thought like this approach will not work okay what i thought is okay so many so i thought like no no no this approach i think it will not work so either when i look how i take it when i'm comparing to the flower okay uh first uh loop approach allow it's for it to go through okay then loops allow fl plus to increase because fl is already seen right so how i'm like breaking c uh first i thought like okay we can break like a fl then lo o w w e e here okay this tari se kuch kar sakta hai then i think we can compare this correct so okay i can be do like this okay something then fl then look ko either okay so it will see li is not equal right to this all these things la is not there so look will break here take a break was like a loop then our answer so let's say uh one person is don't know how to write the code okay even though you copy just this one okay whatever coming to your mind okay give to give to chat gpt telling okay i i thought of this solution give me the exact code how i am thinking okay it will give you the exact code okay just go through that code dry run again okay where it is failing okay doesn't matter it is like a failing something okay where it is failing it will fail at some point right because your code may be breakable okay or like a fold may be like not efficient okay somewhere it is failing right so now you go to the lid code solutions okay see the solution or like ask to the gpt only okay uh what may be the next like a best approach okay uh rather than this okay we'll give you the solution okay so it given me the solution okay what it is doing okay so this is the same exact solution it's given me okay it is also available in the code you can see when this problem it is storing the string zero okay string zero means they go very fast list of strings are So, one of the strings is string zero, string zero means a square paper down, flower, string zero means flower, so this is like a zero, this is like a one, this is like a two, right? So string zero means strings of, that's right, if I'm going to link for htrs, strings of zero. I'll dry run also. Okay. Don't worry. I'll go to again. This is the optimal approach. Okay. Now root force peh bhi jahonga. Root force me kya hai? Q nahi approach kar sakte. Phir mahi isko again ahonga. Okay. So this is only the solution. See the solution. Okay. So what it is doing? is first taking the prefix take a prefix propellable indian what is this flower it is strings of zero then it is taking one follow uh like a taking s s in strings okay strings means this one okay s in strings starting whenever like there is a concept called like a start stop step okay so this is the only concept so what it is taking taking from one index okay up to the last okay means okay okay starting from one index up to the last means flow and flight will be only iterate here okay then i equals to zero okay i equals to zero is taking while i is is less than length of prefix okay length of prefix means flower of length of flower how much like a six okay okay and i is less than length of s length of s kya hai abhi ke liye s kya hai flow right why is it because s is here, once is here, so now flow, flow is what is it, 4, i is 0, so 0 is less than 6 and 0 is less than 4 and again i am saying okay this is the second iteration so the end me what happens, that is that the two conditions are true, if one if one condition is failing then it will not go for next condition right to check okay we'll only stop there okay then it is checking like if prefix of i okay prefix of i means this one okay f is not equals to s of i it is not like that right okay then break Just like this condition. Like this condition, if it comes to this condition, then it doesn't match. So it is not the same condition. Then what it is telling, i plus 1, then next index. If it is not the case, go for the next. So what it is doing then, again checking for the L. okay l is doing okay l is same o is also same i plus one hote zara okay kab tak jab tak zero is less than or like something is less than this one this conditions okay then uh i plus one hote zara i say uh then what is happening at the some point okay let's a e okay so when it comes to this one okay no no no it will fail in this one okay so when it will come to this okay like it will check for up to the flow okay it is also check up to the flow now it is like a equal okay all equal okay so now what will happen it will come for like a i plus 1 when it will go to the i plus one it is five okay so when it will be five five is less than six right and is five is less than four no okay i will take your doubt okay and the next five is less than four right and not okay so it will condition will fail and it will go for prefix equals to prefix so like a zero to i okay i means uh the next one okay so if you're confused till now okay we will go for this also okay okay so is this also source approach yes those approach is the below one group post approach but i'm going to touch you with the fish and copy from then get on there okay so so can we go to the next iteration otherwise i'll i'll simply store the values also okay so let's say this was telling like a prefix equals to strength of zero right otherwise today i'll write on there only so when it is telling prefix prefix it goes to now okay then what is the code i think for so it is telling for s and and strs starting from length starting from one to ten okay means i'm also writing here what does it mean it's like flow and flight is that it flow right flow and flight then um okay so now i'll compare the character voice so for that i'm taking one variable which is i goes to zero and then we'll compare length of prefix okay and i is less than length of i is less than length of it's nice less than length of this uh which is now length of prefixes what when i can get translated if it says 6 hope you know what is the prefix prefaces flower length of assessments we start in index which is 4 low okay now both condition is satisfied right but uh when it will uh i equals to zero one two three okay so that it will do okay when it will cross okay so five it will condition will satisfy so then it's the prefix of i the prefix of i is not equals to s of i then condition will break but it is written here then else okay else i equals to i plus 20 okay i got two characters so break look okay i will do the same then go for the next index okay so hope you understand it so if we will go for the iteration one like that okay so i'm writing again prefix equals to flower okay for your sake okay and s equals to flow okay i equals to zero okay so it will go like i in the zero flow is in the zero flow it will go to so i'm writing in the index manner prefix of i okay then s of i okay then uh it will go for you okay right so yeah so prefix of i will be f right f s of i will be f correct then uh zero okay so if prefix of i is not equals to s of i no it's not the same case right then i will go for one iteration okay so then it will like l l will come prefix of i uh prefix of one will be yes l will come s of i will be l also come okay then second iteration prefix of i o will come where o will come there also o will come okay then third iteration w will come okay here also w will come okay so now i equals to uh four right now it will be i equals to four okay so uh zero one two three happened okay now i equals to four so while it will go for the check this condition okay so this condition will satisfy right while i equals to four is less than six okay and four is less than four condition will fail here okay so uh then it will come as a false okay then it will stop the while loop then it will check for this next this one okay so then prefix equals to okay and then i i'll write here okay i'm sending this one i will you will be stopped and do you do this condition four is less than six and raise is then four so this condition will come as a false okay so that's why i look stop okay yeah so then student will be executed so next line is prefix of uh i prefix equals to prefix uh starting is zero till i okay till i means till four okay four is executing right so what does it mean right here okay what does it mean so it means of flower till four okay so flower till floor means now prefix will be new okay so this means prefix starting to store it so why it is because we are not storing like a hazma or something okay so like that we are just taking one variable called prefix okay so whatever the value is okay we are storing in that we are replacing so up to that what is the flower is there right so now when like it will come okay flower will come then up to this this condition will satisfy like a fail okay now uh zero one two three okay it will store there so in this also n minus one will follow okay so that's why it will not go till like a four that will go till this one okay now what's the next condition so it is a base condition right so that prefix so till now you compared something okay so let's say is there any next test cases there where prefix is coming as a null okay after the all the searching right so it will come as a like a return as a null okay and then it will return as a man if it's okay so in the next iteration what will happen it will compare with flight correct so already we are compared with the flow right so and the next iteration so what is the next iteration will be uh so it will go uh it started from one okay so now it will increase okay so now our s will be s will be light correct so s will be flight then again i will be starting from zero okay prefix will uh be now flow okay don't confuse that we are taking prefix as a uh index strings of one don't think like that so how prefix are coming you know so after we compared okay flower with flow okay so i will stop here okay then we are taking as a prefix goes to prefix of this one. So, what was our prefix first? It was flower. So, flower, until the third time, until the comparison, we are taking so much. So, that's why, that's how like prefixes came as a flow, correct. So, now our S is like a current string is like a flag okay now i will come there like this one with but let's them so this one is i okay okay you consider this as an i i don't know how it is like a capital border so you consider this as i i'm comparing prefix of i okay then s of i okay so now i will be zero prefix of i will be f right this one prefix of pi will be f so may the liquid at now f l o w okay zero one two three okay so this is our prefix okay so this is our prefix and s may be very common f, l, i, c. I am writing for 0, 1, 2, 3, 4, 5. So, when i equals to 0, prefix will be f, then s of i will be also f, correct, ff. So this is same, nothing will happen, when it will not same, then you break. now l will come okay now l will come here also l will come okay okay then now i equals to two okay in the i equals to two what is there in the prefix o is there right so o will come okay o will come okay then here i feel i will become okay because s of i will be now and 2 so in the s of 2 what is there i is there so it is break okay uh so uh if we see our like solution so if prefix of i is not equals to s of i then you simply break okay don't go to the else condition okay so now i'll write as a break okay break condition and so now it will go for this this one right so now what is prefix okay prefix will be uh what i equals to 2 so flow flow tilde 2 okay so flow tilde 2 means s of 2 i'm sorry what is s1 flow tilde 1 means fl okay so that's how are like a flow is uh sorry prefixes game okay right so now it will return the i felt as a stream correct about the things correct any any confusion okay i think anuja in one conclusion yeah i know why we are not uh expanding with the split of the strings i i understand that python or any language supports the you can say prefix functionality but if in case we have certain uh you can say process where we are looking forward for a long string right so it could be a sentence also where we can just see across whether the words are overlapping yeah and then so so does that has requirement or any anyhow we suppose that uh shall we also look forward the split of the word system like the characters it will work it will work why it will not work so do you think we also introduce the split of the you can say characters beforehand while we just check for the prefix we are comparing this was column wise okay column wise character if you speak okay and yeah this will work even in long sentence that's why i written one condition if you see all the 200 uh string means see i have written one condition also okay so strings length will be like up to 200 yeah 200 means makes sense it will like a sentence also yeah it will work it could be a long sentence it will work why do why do you think it will not work i mean i'm not saying that it should not work i'm trying to understand why we are not like we can use it, we can also divide by the strings, so why we are not using it, my question is that like if we have all the strings like flower, flow, flight we have just like this, flower, flow, flight like longest common prefix is one keyword and another could be just having prefix as a keyword in another sentence with the same list this is one string and we all just have another string is common or you can say prefix anything just like prefix perfect right so I am just doing this first string short characters split that is also possible let's say why do you think like a split as a split we are going to be we are going to split career what it is taking you are going to be a character to upper case lower case issue is you have to be a common capital C right now why do you think it will come like it capital case or small case same prefix except I feel like a take as the same. Capital F and smallest is the same. Okay. Yeah. Okay. Yeah. Otherwise. I mean, that is my question. Like capital. I have the longest test for you. Longest common prefix. So, like we write generally, we give common to small. Then we start the word again. Common is common capital. Like you have done it. foreign us-tarah ke thought leke jayenge to kya humare liye split karna pahle possibility hai ya phir split ki zharwati nahi hai kahi pere split ki zharwati nahi hai split ki total zharwati nahi hai capital loya small letter lo and this is kind of coming towards any streaming also right kya agar hum kahi pe bhi real text streaming ho rahi hai the same kind of situation can come. So, where you can say character splitting is not need to ask value in processing is not need to directly you can pass. Is it? Because a because a sentence can also contain junk values. Because when you do I have a lot of things about asking values and junk characters that I am trying to do. Do you have any other issues? I have a third question. If there is a word in which I have a sentence, like asking character, junk values, that way. Because there is a common difference. but there will be some assertions that we can manage system characters which are human readable not this no no no not the special characters you can say machine language kind of characters If you have a text file or a PDF So, when you put it in streaming you can check what you can do in your characters Are you having some characters like this? Or you can do it before you can do it No, it's 0, 1 to 3 there are symbolic characters I have somewhere, but I can give you, okay, I can continue, I can continue, I can continue, I can continue, I can continue, 7 bit, 0 to, junk, junk characters, you, let me just try checking the symbols, just speaking sometime, comment out question long string yes it will work yes it will work yes it will work long string second if you are confused like capital let's say example I am taking light low when it will compare and it will compare f, it will like a fail, why it will fail because capital or this is not, but now we can convert it in lowercase. let's say the strings, this array is strs i mean array so s.loyer something like for s in strs okay s in strs s.loyer function So, this you have to convert, this you have to do, then you can I have an example paste for everyone, if you want junk characters, when data correction happens or machine generated information happens, there are some characters that are decoded which you can't encode. That's a byte order leaking. I'm going to talk about these characters because this system readable, human readable I am taking as a string only as an example I am not taking as a string only as an example order, data, data, corrections, you can check. So, you can get traces in which you have broken unicodes. And this is in NLP and that's where I'm just trying to ask you like how this will be handled. And you have to encode into something can decode into UTF-8 character. Okay. These are not like a normal characters, right? These are not the normal characters. So, you can encode okay with some some things okay and then decode into utf8 i don't know how it works okay and then never introduced to this but these all strings are you are saying okay you are seeing in utf8 character right so you can may you have something like a some decode function you can write or like there will be okay in the python i don't know so you can decode to this okay and and code to some like some latin character or something okay then you can decode so you can do like that hope you understood okay thank you thank you thank you thank you uh yeah you can go yeah that's what i'm saying like there is a constraint no i got my question i guess that what anuja is asking is correct only but there's a constraint in the in the in the problem statement that we have working which says it should be english characters and also it says that there is a length assigned so his point is valid but i guess in this in this problem statement we can we have to work within that constraint but i i i got i'm clear constant is clear right even like a utf8 characters only i am like a talking in only english not in those languages which like those characters that have sent okay but yeah if that's so you can convert into utfa okay on something then i can proceed with that i don't have the constant here okay you can see i have already like mentioned like english letters only i'm sorry if i missed something in the constraint okay thank you so okay we can move forward with like okay you can submit okay this one um the motto is to solve this question is not like a big case uh just a minute because okay i'll admit it the motto is not to solve this problem okay just think like how you can solve okay let's say the problem the solution is coming right then if you can't able to write even the code okay give give this uh like a copy like this solution then verify yourself like a how the like a efficient it is okay otherwise but like it is right so then you can like so that's the motto to solve this question okay yeah going to a case yeah we can go ahead sir basically a test case fail so if you could look into it test case number 4 okay not sure where it's failing test case 4 fail okay for someone I think Satya is saying it's passing for him so maybe I I might have some mistake I need to check one second no you can check one second yeah I need to check at my end yeah for some it's passing yeah yeah it's okay to myself uh thank you and then proceed towards do you have any doubt again like a weakness wait second do you have any doubt memo you already raised okay thank you um have been going for the tree okay yes so um yeah so so tree is like a important concept wherever you go like if you would go in like an arc structure or like using a very various like right to see the practical tree also or like a office or structure okay there also okay so wherever you use the tree family tree right so there's only the tree okay we used to solve all the problem okay like various kind of solve uh it's like you can find the minimum part okay uh from one end to another end okay mostly that okay some routing problem okay so those you can solve okay and yeah this kind of problem we can solve but before going to the tree okay so so what is tree like a tree is like a um you can say non-linear data structure okay used to organize the data hierarchically okay like unlike array uh where elements are arranged in a sequence a tree organized the elements into um like parent-child relationships okay for example if you see here okay one is a parent of like a two okay two is a parent of like a four so it's kind of a confusion only okay philosophically if you think who is the parent of who's okay until you see the very child mode okay okay you got it so these are the only child's but if you see like uh this one okay he okay if you see the middle layer okay it may be the parent okay maybe the child okay so yeah so this thing's going right and so there are some concepts okay in the tree um technically if you see so okay so this question is around like a dfs i have given like i'm sorry for that level order traversal okay uh i don't mean to give you this um before like going to the tree how many types of tree okay so i want to introduce that but yeah we'll solve in next class we'll keep it okay but before we go to this bfs and dfs we need to understand like what are the types of and how the tree traversal works right then we will go for like this bfs things right so in this class may you solve the problem okay it's not necessary to solve again okay we'll solve in next class okay but for that i'll i want to understand you what is the leaf node is what are the edges okay what is the root okay maybe like it sounds familiar to go but i want to give you one overview so node is like a single element okay you can see node is like a single element in in that day for example like if you've seen one two three okay so those we called as you know okay what is happening but i want to write here okay and then uh we called root okay so root is like it topmost node, third tree, topmost node, which is, and then leaf node is there, so leaf node is like a node with no children and say node with no children last note notes of the drain okay as you can understand it i don't like to understand the research is edge and then that's it then uh there are different types of tree okay so like there is binary tree okay and there is full binary tree complete binary tree okay these are the like a so binary tree is a like so there is a perfect binary tree okay squared binary tree okay so let's understand what is binary tree okay you already like a jb uh part of what is binary tree so minority tree is like in which each node can have at most two children so what are those two children called left children and right right children okay and one more thing a node may have no children okay only a left child or only a right child or only both children okay so yeah maybe okay so if we see one example okay if i take 10 then i'm taking as a tree okay for the visualization then 20 30 okay okay and then something what is here okay so if we see if you notice here like that node 20 has only a left cell right and this is uh perfectly a valid binary why it is called because we have at most like and like we have at most like a two children and a binary doesn't mean like that every node must have a exactly two children right so it may have uh as i told it may have like one children okay it may have a left side only it may have a right one okay so we seen in a visualization okay so let's see like how we can define in code base okay so if i want to write a code okay then i'll start with one class okay i'll take one mode okay then i'll like define one function here def okay in it crazy dog things crazy so class mode then def def means we used to declare one function so this is the constructor what i have to declare self data data means like a what should be the data in the in that node okay then self dot data equals to data cell dot one right child is there okay which is for now none you can define it later and the left child will be there then the pan is and then independent later okay so let's understand uh what does it mean so class you know like a it's like a you can say blueprint of like creating a tree node right and in the innate okay we run whenever we create a new node okay we just have to call that node like a node of something okay we we can pass the data to what we want to pass and then uh we can pass it there like 10 20 30 okay something if we can and then self.data where it is used to store the value only as i told okay and then the right side you can like it means right side which is doesn't exist yet okay and the left side i can store the left side of that item so if we want to store then you can define one function what here here 2 equals to more of 20 so let's say we declared with 20 then if you want to print then you can print the root.data okay then you can print root.left and right okay so at this point if you want to print there is only one new okay it will come as a content okay and then again if you want to like a assign root dot left okay you can assign root dot left equals two more so now 20 has a two children called so uh i assigned as a root node as a 20 okay now 20 has a left children for 10 and is the right children for 30. yes and then so let's say i want to introduce to the left to left okay so let's say so abhi three node ho gaya right so So if I want to add another node like 10 or 30, what I will do, if I want to add another node.left.left goes to node of 40 and then simply like a root.right.right node of 50 okay i can assign and i i can go ahead and do the things okay okay so it will go to the left of left it will go to the right of it okay so yeah so this is how we write uh this tree okay in python okay because just a second like uh just where i can finish the what are the types of a node then i can go to your question okay um if we see then uh like what are the types of so i can copy paste present from so i can okay so types of binary tree or repository only okay so my family types like this okay binary tree then complete binary tree okay then perfect binary tree okay then skew binary tree and uh what uh another is there okay a like balanced binary tree but that is from under binary search tree that is a different concept but balanced binary tree is there but that is coming out of a different concept is they used to call like a binary search tree okay where like a height of a left is minus height of right is should be the less less than one so like that concept is done uh but yeah we simply consider these four as the types okay so if we see like what is full binary tree so so full binary trees uh in which every node has either zero or two children so no node exactly has a one children okay so what do i mean okay i will complete simply this one only they call a full binary name is a problem okay so this cannot cancel so this cannot be a full binary either zero or like a So this is called full binary tree, either zero or two children, yeah, complete binary tree. Okay. so in the complete binary tree uh in in which like every level completely failed except like a except the last level okay um so what do i mean is i can give you this example only so i mean that modes on the last level must be created from the left to right okay with no gaps right so this is a complete binary tree because it is filling from like a left to right okay so this is called like a complete like a binary tree okay so this is a concept like where it like it is important for like binary hips which is like which are commonly used to implement the priority gives okay so we'll come to the rest okay like after this class i will i'll introduce um so i'll write here in shortly notes on the last level must be from left to right with no gaps. So no gaps ka matlab kya hai, yeh, dekh rahe ho, matlab 30 ka left, left yeh nahi hai, but 30 ka right a gaya, so this is the invalid, it okay it's going invalid paying okay perfect binary then perfect binary tree so uh in the perfect binary tree and there are two properties are there every internal node has exactly two children okay so this is the one condition okay and there is another condition is all the last level nodes okay means all the live nodes at the same depth okay so kya bol rao hundu hai the same way copy karta ron so every internal node okay has exactly two children okay okay Every internal node has exactly two children, all the lived nodes are at the same depth. So, all the leaf nodes are in the same depth, okay. Kisika aisa nahi hona chahi hai, like, even though, so something 54, even though this up to 56 something, some kind of aisa nahi hona chahi hai, okay. So, exact same depth pe hona chahi hai, so, this is the 0, 1, 2 depth, okay. And then every internal node has two children, two children on the side, exactly. So if you calculate in this, the height will be 2, as I told it, 0, 1, 2. This is the 0 height, this is the one height, there is the second height, what we call it. so uh if you want to calculate how many total nodes are there okay through the height of the profit binary so if you want to see like to calculate so there is a formula n equals to 2 to the power of h plus one okay four minus one okay so this is the formula where you can calculate the total number of mops, okay. In this example only, okay. So how many, what is the height? Okay, two, okay. Two is there, right. Then we go to the power, whatever, okay, two plus one, three, the power three minus one, seven, okay. If you calculate So this is how you can calculate the total number of the nodes, okay, skewed is very simple, okay, skewed binary tree, okay, so skewed binary trees in which each node has has only one child. Okay. Each mode has only one. Okay. One, two, three. So this is something like a skew okay okay so this is what we called as a left skewed okay left of skewed okay so there is a other is that of skewed over the right skewed okay so in this only we have divided left skewed and right skewed and uh uh you can say a skewed tree can behave like a linked list also okay and its height can be uh like n minus one okay number of uh number of mode minus one if you can calculate and if you want to calculate the time okay to reach the till the mode so which is big over and okay this is very simple right so yeah so this is all about the uh all node okay so i want to write so these things get up skilled and then write skilled ticket uh yeah because it's again okay yeah go ahead uh sir uh aapne object initialized the node if you could scroll so in here basically you initialize the object of node class and then basically you are assigning root dot left equal to node 10. it will again initialize the constructor So if you assign it, it is basically assigning the object to the left attribute. Sorry. Left attribute. No, we don't have to do it. We have to basically pass the data to the left part. So you already initialize one node, otherwise if you like a. you have all these two comments okay okay so what i'm saying this is a this is an instance of node class root and then we are initializing our attribute variables left and right so while doing that we are assigning this object node object to left and right so is it fine or i mean I am just trying to understand that what will be assigned in left 10 will be assigned in left 10 so left 10 will be assigned here we have done none, so how will it be assigned in left 10 okay so initially initially it is none so there is a none key what is there so null type and initially we are going to assign and then if we are going to node 10 assign so it will go to the data so data will now the self.data will have 10 right? self.data will self.data will equal to 10 because you have made a node of 10 I am a right one left but sir. what is that when we initial the class construct Then you are doing it here root equal to node of 20 so it basically initialized this construct and in here it will pass 10. 20 so 20 is passed to data self dot data and right and left is none now next time right next time again you are initializing with 10 class right so now dot left okay with dot left parameter then this will contain the object of this class the instance of this class instance of this class node of 10 will get passed here self.data will have 10 and then right and left will be none right and left. to be none now if someone can construct one class to make a play with some of those who will be caught in python it basically initialize the constructor constructor initialize ha ha ha 20 we have no construction is initialize you have a science self.detail equal to 20 then a node of 10 node of 10 may be a constructor in order to be the case you need to go to be able to know you don't have to be able to get up image of the ticket but left man may sign caro load of 10 so sell dot left match of you know taken oh no don't have time or is the left man okay okay okay object you are assigning object to left and right or if you are like a condition I will comment out so it is still not clear to me so let's say if you have a doubt so if I will I will take it if I will also assign so if you want you have to create one more first time let's say comment out the right so left and right left and right is none second time left Now this variable, this attribute, we are initializing here, we have given note 10, after giving note 10, I think that object is 10, right, self.data is equal to 10, again the left and right, okay, okay, got it, fine, okay, sir, there was another question below that you have explained the tree, if you could scroll down, this one complete binary tree and the full binary tree this looks exactly the same because you have said either 0 or 2 children even in the complete binary tree you can take any section of every tree and then there is our 0 or 2 children right? yeah this is complete binary tree It is a partial complete binary tree, right? I am going to post it, is it complete binary tree or not? It will not. Why not? There is notes on the last level must be filled from left to right, with no gaps. So, I am left to right, with no gaps. My right means that it is the same, but I am left to right, so this will come under complete binary tree. No gaps. Sir, but here is a gap, right side. Okay, with no gaps, I mean, my example, if you are a gap, left in the gap, left in the gap, left value, left in the gap, left value, if you are not able to get a minimum step, I will take a complete picture, so I will take a complete binary image, this is the same example I had given it, so I would also say that if we are left to right traverse then there shouldn't we have any gap. Okay, D, E, F. So, we don't have any gap. Okay. If F, if I leave F, if I leave C, if I leave C to right, if I want to fill something, then it doesn't happen. So, basically, we always have left to right traverse and then we have to check if there is any gap or not. Correct. Correct? Okay. Okay. Thank you. Thank you, Vikas. One second move. Yeah. Go ahead. Sir, my question is from Vikas. I have to say complete binary that there should not be gaps. But in full binary which I understand, there are 0 and 2 notes. And in perfect binary there are 0 and 2 notes. Exactly 2 notes. There are also Leaf notes are in the same depth in the same depth So if I have some five and six this is the whole binary tree but the complete perfect binary tree why not because this is the same level same tips then i understood thank you yeah 1010 to 20 example you a So, what is this? This is going to be partial, incomplete? This is going to be partial, incomplete? Is it correct? in complete partial is it correct there is a concept like partial complete binary partial complete I don't think so this is not a complete biometric maybe I just thought of what it is yeah example okay partial complete to not but invalid as complete so invalid as complete that's what i told right so this is a invalid then i only have the five so is it going to be partial yeah partial you can say okay thank you okay so so what's next so yeah i'll continue this three part okay uh we'll go through this okay next class so yes so in the next class i'll uh do the traversal things okay so in the binary uh tree okay how we are doing the traversal like in order pre-order and post-order okay that we do the traversal then in the next class itself like i'll introduce to the pfs concepts okay dfs concepts and this and also yeah level order traversal also so yeah now if i can give you the overview like what's the traversal is so this will be a good example okay so what do i mean by in order pre-order okay so let's just go to the pre-order uh okay so in a layman term okay so you can put the three sticks okay so first is like put the sticks here second stick here third stick freedom okay and then if you want to and in the every node okay not in the one node like a 10 okay in the every node if you want to put the sticks okay and if i mean by pre-order okay uh go uh with like a left sticks okay and traverse starts or traverse till the end okay if you do this then you will get a pre-order traversal i will go in that traversal i'll get like 10 20 4 then 5 left right 5 then i'll get it will go in this manner okay so this this this and this okay then 30 okay 30 will come 6 then 7 okay i'll stop here okay because i'll not find any left part of sticks this is what do i mean by like a pre-order reversal okay yeah so this is the classes we can add if you don't have any questions nice or like i want to ask like a question okay so did you guys went through that resources that i have sent just i want to recall you those things you can yeah i'm wrong i can send currently not this one where is this i recall in the ppt partial pt binary tree yeah it's it will be always in a bfs order okay why you so be diplomatic here like i'm gonna say if that is permissible this is visible okay don't have to be like i'll save the resources just ask me like a can you please the resources i can i'll send that that is permissible see in the corporate okay you can be the diplomatic you have to be the diplomatic okay and people are there you can talk like okay so in the class you don't have to be diplomatic just chill and ask for that okay and if you interact with the professor if you're like if you're even like interact if you want to go tomorrow there there is a lab or something okay as a research assistant there if you will diplomatic the professor they will like simply get out of you like a classes something is that slaps don't have to be i'm starting to okay or anyone like a collected the resources let me search it in my tab okay yeah someone said the resources yeah i think in the last class also thanks to japan like i said the resources it's permissible man like a it's it's not like a see education is like a not like a to cover up anything like you have like a closed resources right so it's open to everyone if you find everywhere else so it's not like a you have to permit or like something i said already it it's like it's already like a formisable right it's not like i'm not promising agentic guys i follow on udemy like a post okay for the agentic one you can follow the same uh let me search that and that's a long bit of i have one question that's for the um morning class they explained us what is the in order pre-order uh and post order is the bfs and depth first best first algorithm that you are going to they are also divided based on this one yeah like in the okay so let me tell you these concepts are mostly used in a graph okay and uh uh dfs and davis and that is uh again like a used for like um what to tell that is again like a root searching problem or like a path finding problem okay so those things you can like these problems are using. So there is a resources add donor which I followed but I don't like it. I liked it but I didn't find my use case there. You can follow the same. Maybe it works for you. Yeah, CampusX is also good. it's nice place thing but you know focus on most towards uh like cnn kind of things cnn and those kind of things will be very useful okay so something close the class or like is it like this okay okay as you do have still in doubt thank you everyone thanks again like uh i'll explain in next class okay well then thank you i need to open boy he left the class so they come uh nixon um do you have any doubt today you don't provide any labeling sir i already provided because actually i'm enjoying late so there's a no showing so please send again one okay i'm stopping recording this one yes i got it and get it sir thank you