[User] Please transcribe this text

[Assistant] So the rule number 9 says at the end of the expression obviously pop and print all the operators from the stack which are left out. We have only one operator left out so we will pop it out. That is the divide by operator. So stack becomes empty and we just print this divide by operator over here and now


[User] Please transcribe this text

[Assistant] If you observe this entire expression, it is exactly identical to what the manual


[User] Please transcribe this text

[Assistant] These two extra additional rules for the symbols that is opening bracket and closing bracket applied perfectly fine.


[User] Please transcribe this text

[Assistant] And that resulted into a completely different postfix expression.


[User] Please transcribe this text

[Assistant] Just by adding these brackets. The expression was the same.


[User] Please transcribe this text

[Assistant] As question number one, but just because of the addition of these extra brackets and the addition of these two rules, our stack operations happen differently in different order.


[User] Please transcribe this text

[Assistant] Okay, so this was infix to postfix conversion using stacked data structure and we saw all the rules, we understood how they are applied and we applied them live on two examples, one with brackets, one without brackets. We also saw the manual conversion and we compared the results. In the next tutorial, we'll see the algorithmic way of how this stacked data structure can be used. So we'll write the algorithm, we'll understand the algorithm. So essentially what we're going to do, we're going to take all these rules


[User] Please transcribe this text

[Assistant] And we're gonna write a pseudo code using these rules so that we can then use that pseudo code and write a program.


[User] Please transcribe this text

[Assistant] In C++ to convert a infix expression to postfix.


[User] Please transcribe this text

[Assistant] Because you also need to see the practical side of the application of stack, that is infix to postfix conversion. So we need to write a program, right? And to write a program, we need to understand the algorithm, the pseudo code. So next tutorial, we'll see the pseudo code and try to, you know, debug it, dry run it by taking examples because that's the best way to understand.


[User] Please transcribe this text

[Assistant] So I'm going to conclude this video over here. I hope you understood the conversion using stack data structure. I hope you understood the rules. Please note these rules down and


[User] Please transcribe this text

[Assistant] Try to use these rules on multiple examples for best practice. If you've understood this video, if you've watched this video so far, please give this video a like. Do share it with your friends. It means a lot.


[User] Please transcribe this text

[Assistant] Definitely let me know in the comments how this video was and I'll see you guys in the next video. Peace!


[User] Please transcribe this text

[Assistant] I build a house.


[User] Please transcribe this text

[Assistant] Tell me this Vinnie, was Belle a good girl while Mo's been away?


[User] Please transcribe this text

[Assistant] Yeah, I, I love my feelings. I look up Moana's photo, he's doing it in my teaser game, caught me copying. I actually learnt about feelings at her new


[User] Please transcribe this text

[Assistant] Hello grammarians, I wanted to talk to you again about mutant plurals. So to review a mutant plural is there are only seven of them in English, and they all change sound when they pluralize. You don't add an S, you don't add an EN, you don't change the ending, you change the vowel. And there are only seven that go like this.


[User] Please transcribe this text

[Assistant] And these words become, in the plural, men.


[User] Please transcribe this text

[Assistant] Now, the reason that we have these seven weird mutant plurals in English is kind of complicated, but I'm lucky enough to be able to work with an actual linguist.


[User] Please transcribe this text

[Assistant] Alright, so Jake, what is the deal with feet? Where do these mutant plurals come from? If we take the word foot.


[User] Please transcribe this text

[Assistant] And we drag it through history. How do we get, how do we get to the plural as feet? What's the deal with that?


[User] Please transcribe this text

[Assistant] The uuuh sound tried to sound more like the ee sound. This is just a pattern that we found in Germanic languages.


[User] Please transcribe this text

[Assistant] So, so what happens when you combine the uuuh sound with the ee sound? What sound do you get?


[User] Please transcribe this text

[Assistant] So, so this sound, or, or I guess the, so the plural of German, Fuss, is what you said.


[User] Please transcribe this text

[Assistant] So, okay, so, so bring this home for me. So at some point in the development of English, or of all these Germanic languages, we had the foot, we had this word foot, and then it turned into footy, and then it turned into what? It turned into footy?


[User] Please transcribe this text

[Assistant] So this is, this is sort of the broad pattern these, these mutant words all take. Is this umlaut mutation, right? Because this, this, this little, these double dots that go over a, oh it looks like a little smiley face, uh, that go over a vowel, change its color, right? That change its meaning.


[User] Please transcribe this text

[Assistant] Cool. Well, I hope that cleared some things up for you. You can learn anything. David out. Jake out. That was a high five, not a slap.


[User] Please transcribe this text

[Assistant] Hey, what's going on guys? Tanmay here for simple snippets and welcome back to another video tutorial on data structures and algorithms. And as the title of the video suggests, today we're going to discuss more about infix, prefix and postfix expressions.


[User] Please transcribe this text

[Assistant] And we are going to focus on why do we need these three different types of expressions and more specifically we are going to focus on how prefix and postfix formats that is the prefix and postfix notation are more suitable for machine reading and parsing.


[User] Please transcribe this text

[Assistant] Rather than our regular infix expression. Now, if you don't know what is infix prefix and postfix in the previous tutorial of this playlist of this course, we discussed in detail what these three different expressions are.


[User] Please transcribe this text

[Assistant] We also did cover a little bit on why do we need them, but here I'm gonna give you a little bit more examples so that the idea of infix, prefix and postfix is very clear and why do we need a prefix and postfix.


[User] Please transcribe this text

[Assistant] Which is more suitable for machine parsing in algorithms is gonna be very clear by giving examples. Okay.


[User] Please transcribe this text

[Assistant] If you're new to my channel, my name is Tanmay Sakpal and I do a lot of computer science and information technology video tutorials like computer programming, development, technology talks and a lot more on this channel.


[User] Please transcribe this text

[Assistant] So if that's something you're interested into, then definitely subscribe and turn on the notifications to get the latest updates and never miss out on such important topics.


[User] Please transcribe this text

[Assistant] So on the left hand side, I have mentioned why do we need three different expressions. This is also covered in previous tutorial.


[User] Please transcribe this text

[Assistant] But just to sum it up, infix expressions are more human readable. So here's the infix expression which is a plus b star c, where the operator comes in between the two operands. Okay, so these are two operands and then there is an operator in between. Again over here also you can see.


[User] Please transcribe this text

[Assistant] There is an operator and then it is surrounded by two operands. Now quick note, we are talking about operators which are binary in nature, which means that they operate on two operands at a time. And moving on, prefix and postfix do not need the concept of precedence and associativity.


[User] Please transcribe this text

[Assistant] Hence it becomes highly efficient to parse expressions in prefix or postfix format. Okay, so we did discuss this in the previous tutorial, but just to sum it up.


[User] Please transcribe this text

[Assistant] Whenever you get an expression like this, let's say this is our infix expression, and I've given our assumed value of a3, b is 4, and c is 5.


[User] Please transcribe this text

[Assistant] So if you substitute these values in case one, what can happen is we can say 3 plus 4 star, star is multiplication.


[User] Please transcribe this text

[Assistant] Now we can either do 4 star 5 first and then add it with 3 or a second use case can be we can do 3 plus 4 first and then multiply the total with 5.


[User] Please transcribe this text

[Assistant] Both of these are possible and this is where the concept of operator precedence comes. Where we need to give each operator a precedence. Operator is this symbol. And according to that, the very first preference is given to parentheses. So, the things or the expressions that come inside parentheses should be evaluated first.


[User] Please transcribe this text

[Assistant] Then we have the exponents, then we have multiplication and division left to right. I'll explain again what what is left to right and then we have addition and subtraction. So in our example, we have addition, right?


[User] Please transcribe this text

[Assistant] We have a addition operator and we have a multiplication operator and according to the precedence multiplication comes before addition. So this is simple arithmetic board mass rule that we learned in our junior stages of mathematics, right? So we know that obviously multiplication happens first.


[User] Please transcribe this text

[Assistant] And this is the correct way of going ahead, right? So we will do 4 star 5 which is 20 and then we will add it with 3 and this will be 23.


[User] Please transcribe this text

[Assistant] This same expression, a plus b star c, this is a infix expression where operator comes in between the two operands, gives us two different results and then we have to pick one based on the operator precedence. Right?


[User] Please transcribe this text

[Assistant] Ambiguity that is causing a little bit confusion.


[User] Please transcribe this text

[Assistant] When you're evaluating a infix expression, you obviously need all these details of operator precedence as well as associativity registered somewhere, stored somewhere so that when you evaluate this infix expression, you apply all these operator precedence and associativity rules


[User] Please transcribe this text

[Assistant] Otherwise, you can get a wrong result also, right?


[User] Please transcribe this text

[Assistant] So this was related to operator precedence. Now I'll explain to you what is associativity also. Let's take another example. Okay, so here's another example of infix expression where we have two operators minus and plus. Now if you see the operator precedence rules in, uh,


[User] Please transcribe this text

[Assistant] Priority number four, we have addition and subtraction. Both of them have same operator precedence, but there is something written in brackets left to right. So this is the associativity rule.


[User] Please transcribe this text

[Assistant] So associativity describes the rule where operators with the same precedence appear in the expression. For example,


[User] Please transcribe this text

[Assistant] Two use cases can happen. We can say a-b happens first and then whatever result we get after a-b will be added with c. Or second case can be a-b plus c happens first.


[User] Please transcribe this text

[Assistant] Right, B plus C happens first and whatever result we get, we subtract it from A.


[User] Please transcribe this text

[Assistant] Right? Now obviously, according to associativity rule, this first one is correct format. So if we substitute all these values, we have 3 minus 4.


[User] Please transcribe this text

[Assistant] Plus five. So three minus four is minus one. Minus one plus five will give us four, right? But if we go ahead with this second use case where we do not apply this associativity rule, let's say we go from right to left. So we calculate b plus c first. So what is b? Four. Four plus five first. And then we subtract it from three.


[User] Please transcribe this text

[Assistant] So it would be 4 plus 5 which is 9 and 9 minus 3 is gonna give us minus 6. So you can see again, two different results are coming from the same expression. Right?


[User] Please transcribe this text

[Assistant] So from the same expression after evaluating this infix expression, we are getting two different results. That is plus 4 and minus 6.


[User] Please transcribe this text

[Assistant] So again a confusion is created, again a ambiguity is created and this is more relevant when it comes to parsing these expressions.


[User] Please transcribe this text

[Assistant] How is prefix and postfix solving this situation? Okay. So let's again take the very first example.


[User] Please transcribe this text

[Assistant] Okay, so as you can see we have two approaches when it comes to infix expression and we are getting two different results. So 35 and 23 these two are not equal. So how does prefix expression solve this issue? Okay, so the same infix expression.


[User] Please transcribe this text

[Assistant] Can be converted into a prefix expression. Now I briefly explained how to convert it, but we will talk about the conversion manually in more detail in further videos. But right now, I'll just quickly tell you what we have to do when you have to do the conversions. So what we have to do, we have to take this expression. So let's say it is a plus b that is happening first.


[User] Please transcribe this text

[Assistant] So since plus is coming in between, it's an infix expression and when you are converting it to prefix, remember the operator comes before the two operands. So plus will come over here. Okay, so it will be plus a b. Okay.


[User] Please transcribe this text

[Assistant] So this bracket is resolved, then we have a star C, right? So now this is one whole operand and this is the second operand and the star is the operator in between these two.


[User] Please transcribe this text

[Assistant] So, in prefix again, as I mentioned, star has to come over here.


[User] Please transcribe this text

[Assistant] This expression will look something like star plus ab and then we have c and if we remove the brackets now, ultimately we will result in star


[User] Please transcribe this text

[Assistant] So this is the expression which is equivalent to the first use case of the infix expression. Now, let's take a look at how the prefix expression would look like for this scenario. So here you can see B star C is calculated first. So star will come outside, right? So we'll have star B C and then we have A plus, right? So again, this becomes one operand and this becomes another operand.


[User] Please transcribe this text

[Assistant] So ultimately when we resolve this, we will get plus A star BC. Okay? So this second infix expression looks like


[User] Please transcribe this text

[Assistant] This in prefix format. Now if you observe this, this infix expression a plus


[User] Please transcribe this text

[Assistant] B star C remains the same in first and second use case. We just added brackets


[User] Please transcribe this text

[Assistant] Both these expressions are totally different. You can see star plus ABC and here we have plus A.


[User] Please transcribe this text

[Assistant] So, depending upon which operation happens first, the entire prefix expression is completely changed. So, star plus abc will give us 35.


[User] Please transcribe this text

[Assistant] And plus A star BC will give us 23. If you ultimately evaluate this, the two separate expressions will give us two separate results. Now this adds a little bit more clarity, right? Because now,


[User] Please transcribe this text

[Assistant] The order of operations and or operator precedence or associativity is not needed over here because now we are completely getting to separate expressions itself.


[User] Please transcribe this text

[Assistant] Over here, we only had one expression a plus b star c and we had to apply the operator precedence to know that b star c happens first.


[User] Please transcribe this text

[Assistant] But now in this case, we don't need to apply operator precedence because we are getting two separate expressions itself. Right, so this expression will always give us 35 and this expression will always give us 23. Now similarly,


[User] Please transcribe this text

[Assistant] This a plus b star c in the postfix will look something like we will have a b plus because this plus will come after the operand and then this star will also come after the c so you will have a b plus c star and for this second scenario in the postfix we will have a


[User] Please transcribe this text

[Assistant] Will look something like this. We will have a b plus c star. So this is one expression.


[User] Please transcribe this text

[Assistant] We have another expression for this second use case. So infix expression remains the same and we have to apply operator precedence to evaluate or to, you know, to figure out which operation happens first. But in postfix and prefix we completely get two separate expressions over here. So a b plus c star will give us 35.


[User] Please transcribe this text

[Assistant] So there is no confusion here. There is no need of operator precedence. There is no need of associativity involved in postfix and prefix and hence prefix and postfix do not need the concept of precedence.


[User] Please transcribe this text

[Assistant] And associativity, hence it becomes highly efficient to parse expressions in prefix or postfix formats.


[User] Please transcribe this text

[Assistant] And that is the reason why whenever you are performing arithmetic calculations in algorithms in computer, in computational programming, usually whenever you pass a infix expression, it is first converted or parsed into either prefix or more preferably


[User] Please transcribe this text

[Assistant] So in second example, we more importantly are needing the associativity concept because minus and plus have


[User] Please transcribe this text

[Assistant] So we have A minus B, so minus comes first.


[User] Please transcribe this text

[Assistant] or this is how the first use case would look like in prefix format and this would always give us four and the same expression in infix would look something like this for the second scenario we have a minus b plus c


[User] Please transcribe this text

[Assistant] So we have plus BC, we will have A and then we have minus over here. So minus A plus BC is what we will have for the second scenario and this will always give us minus 6. So you can see completely the expression is only changing.


[User] Please transcribe this text

[Assistant] And then there is no confusion of getting multiple results. And these were just two examples of basic expressions. You know, these were not very complex expressions. I just took them so that I can explain to you.


[User] Please transcribe this text

[Assistant] Why prefix and postfix is more preferred, but imagine you have a very complex arithmetic calculation where you have multiple variables, multiple constants and multiple operations also.


[User] Please transcribe this text

[Assistant] In that case, you can get many number of possibilities if you are directly using infix expressions and not applying


[User] Please transcribe this text

[Assistant] These concepts of operator precedence and associativity, right?


[User] Please transcribe this text

[Assistant] And then your infix expression becomes very inefficient because every time you have to apply these concepts on every single operation inside that entire arithmetic expression.


[User] Please transcribe this text

[Assistant] So better to parse it in prefix or postfix to make that conversion first and then you are only gonna get single result because each unique expression will give us one unique result only.


[User] Please transcribe this text

[Assistant] So yeaah, this was just an explanation of why prefix and postfix is needed and is highly efficient when it comes to arithmetic calculations in computer algorithms.


[User] Please transcribe this text

[Assistant] So if you've understood this video, if you've understood why we have three different expression formats, which is more human readable, that is infix and why we have prefix and prefix, please give this video a like. Let me know in the comments how this video was.


[User] Please transcribe this text

[Assistant] Do share it with your friends, this is important to understand. In further videos we will see


[User] Please transcribe this text

[Assistant] How to make these conversions happen, we will take some examples and


[User] Please transcribe this text

[Assistant] And we will practice them and later on we will also see how stack can be used to perform these calculations to perform these conversions because


[User] Please transcribe this text

[Assistant] One of the major application of stack data structure is to perform these conversions from infix to prefix and what not. So we'll see that in further videos as well. So thanks for watching. See you in the next one. Peace.


[User] Please transcribe this text

[Assistant] They looked at the crocodiles.


[User] Please transcribe this text

[Assistant] The British Museum would be the answer for a lot of people.


[User] Please transcribe this text

[Assistant] Together with the Louvre in France, the State Heritage Museum in Russia, and the Metropolitan Museum of Art in America, the British Museum is one of the top four museums in the world, out of which the British Museum is the oldest and the biggest with over 8 million artifacts in collection.


[User] Please transcribe this text

[Assistant] Only 1% of its collection is currently on exhibition. 99% is not. That is to say, if all the exhibits are replaced every year, it would take 100 years to get through the entire collection.


[User] Please transcribe this text

[Assistant] Do you feel overwhelmed by the massive collection in the museum? Artifacts in their tens of thousands, which takes days to see.


[User] Please transcribe this text

[Assistant] Well, I'm gonna take care of that just because it's your first time going. Okay. But if you decide to jump further on and maybe...


[User] Please transcribe this text

[Assistant] Let's put it in the present tense. And now normally, under normal circumstances, we'd wanna just add an ED to it in order to form the simple past tense. So we go from walk to walked. We add this ED ending.


[User] Please transcribe this text

[Assistant] And it turns out that there are a lot of irregular verbs that also behave the same way. When we make the past tense, we have this dd sound. Uh, it's just that they're not represented that way in the spelling. I'll give you an example. The present tense form of the word to sleep is sleep. And when we put it in past tense, it is not sleeped, but slept. The pt part of slept does the same work as the ed ending. For the regular plural,


[User] Please transcribe this text

[Assistant] So sleep becomes slept is the same as walk becomes walked. Likewise, keep becomes kept. Build becomes built.


[User] Please transcribe this text

[Assistant] Spend becomes spent, leave becomes left, leap becomes lept, and lose becomes lost.


[User] Please transcribe this text

[Assistant] So although these verbs are all irregular verbs, within their irregularity, at least in this case, there is some common distinctions.


[User] Please transcribe this text

[Assistant] They're all still trying to make the same sound as walked. It just displays differently.


[User] Please transcribe this text

[Assistant] So it's not sleep'd, but slept, not keep'd, but kept, not build'd, but built, not spend'd, but spent, not leave'd, but left, not leap'd, but lept, not lose'd, but lost.


[User] Please transcribe this text

[Assistant] At least, as it applies to modern, standard English. And that, my friends, is the Funky ED. You can learn anything. David out.


[User] Please transcribe this text

[Assistant] Hi everyone, I am your teacher, Jesse, and today we will read the book At Night by Avalyn Davidson. When is night? 밤이 언제에요? Right, night time is when we


[User] Please transcribe this text

[Assistant] Terrific. Dark. D-A-R-K. Dark. At night, we sleep. And at night, the sky is dark.


[User] Please transcribe this text

[Assistant] Now, in this book we have two people. We have the little girl and we have the little girl's dad.


[User] Please transcribe this text

[Assistant] Dad is the same as bother or daddy. In the book, she says dad.


[User] Please transcribe this text

[Assistant] And what are the little girl and her dad looking at? What is this? Dal. Right, in English it's the


[User] Please transcribe this text

[Assistant] Marvellous! Yes, this is the moon. Alright? M O O N Moon. It's very beautiful. Atom daun dal. The beautiful moon.


[User] Please transcribe this text

[Assistant] The little girl and her dad are outside!


[User] Please transcribe this text

[Assistant] They went outside at night. They're not sleeping, right? They don't sleep. They're outside.


[User] Please transcribe this text

[Assistant] And the girl has a special light, right? This light is called a flashlight. F-L-A-S-H-L-I-G-H-T.


[User] Please transcribe this text

[Assistant] Alright, that is a flashlight. With the flashlight, they can see outside. It's dark. 너무 어두워서 flashlight 키면 볼 수 있어요.


[User] Please transcribe this text

[Assistant] It is hard to see things, right?


[User] Please transcribe this text

[Assistant] I can't see the tree. Why? Because it's dark.


[User] Please transcribe this text

[Assistant] Dad and I like to go out at night. 아빠랑 밤에 나가는 게 좋아요. Dad and I like to go out at night.


[User] Please transcribe this text

[Assistant] What are they looking at? 예전에 달 봤어요. Before, they were looking at the moon. What are they looking at now? What is this?


[User] Please transcribe this text

[Assistant] These are stars. Byol, right? Say it with me. Stars.


[User] Please transcribe this text

[Assistant] Super, yes. The stars are very beautiful.


[User] Please transcribe this text

[Assistant] We see stars at night.


[User] Please transcribe this text

[Assistant] 모양 같은 거예요. A pattern is like a shape. Okay? 네모는 패턴처럼요. 삼각은 패턴처럼요. How do the stars make patterns? Hmm, let's find out.


[User] Please transcribe this text

[Assistant] Oh, look at these patterns.


[User] Please transcribe this text

[Assistant] These are star patterns, right? This is a star. This, this, this, this, this, and this are all stars. Here we have seven stars and they make a star pattern. Seven stars can make a star pattern.


[User] Please transcribe this text

[Assistant] Some star patterns have names, uuuh. 어떤 스타 패턴들이 이름도 있어요. Do you know these patterns? Let's take a look. This first pattern, what's it called? Do you know? The name of this pattern is the big dipper. 큰 국자예요.


[User] Please transcribe this text

[Assistant] See, it looks like a gukcha. It looks like a soup spoon. Or a dipper. Right? Here is where our hand goes. Right? You can hold it with your hand. And here...


[User] Please transcribe this text

[Assistant] Right? You can put some water or some soup. Right? It's a big dipper. That's a pattern with the stars.


[User] Please transcribe this text

[Assistant] Here's another star pattern. What's this one's name?


[User] Please transcribe this text

[Assistant] Oh ho ho, the little dipper.


[User] Please transcribe this text

[Assistant] This one is big. This one is very little. Alright? Okay, let's check.


[User] Please transcribe this text

[Assistant] Which one is this one? It is the...


[User] Please transcribe this text

[Assistant] Big dipper, very good. And what's this one? This one is...


[User] Please transcribe this text

[Assistant] Fantastic! Yes! You got them both right. 100%.


[User] Please transcribe this text

[Assistant] There are so many stars and so many patterns. Can you find the Big Dipper?


[User] Please transcribe this text

[Assistant] Where's the Big Dipper? Remember, it's seven stars. Can you find it? Is it here? One, two. No, that's only two stars. Let's find the Big Dipper. Oh, I found it. I found it. Look. One.


[User] Please transcribe this text

[Assistant] There's another star over here.


[User] Please transcribe this text

[Assistant] And there, that's the big dipper! Wow, we found it! Now can you find the little dipper? Where's the little dipper? Remember, the little dipper is upside down. Oh. Oh.


[User] Please transcribe this text

[Assistant] Oh, there it is! There's the little dipper, see?


[User] Please transcribe this text

[Assistant] Big dipper and the little dipper. Wow!


[User] Please transcribe this text

[Assistant] You are great at finding star patterns.


[User] Please transcribe this text

[Assistant] Dad and the little girl are looking at a special star. What is that? Let's find out.


[User] Please transcribe this text

[Assistant] Oh, this is a shooting star. Okay? We see shooting stars at night.


[User] Please transcribe this text

[Assistant] They look like stars falling to earth. Okay? 지구까지 떨어지는 별 같아 보여요.


[User] Please transcribe this text

[Assistant] But, it's not a star, okay? They are not stars.


[User] Please transcribe this text

[Assistant] They are hot rocks from space.


[User] Please transcribe this text

[Assistant] Okay, it looks like a falling star, but it's not a falling star. It is a hot rock.


[User] Please transcribe this text

[Assistant] More closely at shooting stars, okay?


[User] Please transcribe this text

[Assistant] Yes it's a rock. 어디에서 바위 왔어요? Where did the rock come from? It came from


[User] Please transcribe this text

[Assistant] Space, yes, the rock is from space. 우주에 온 바우예요. Wow. Look closely. Here is the rock in space. But, 깜짝이 불이 나와요. Okay. 너무 더워서 색깔이 하얀색이에요. Wow. And it looks like a star. 별처럼 보여요.


[User] Please transcribe this text

[Assistant] Burn up. That's why it looks like a star. 신기하죠? It's amazing, isn't it? That's everything for part 1 of At Night. Join me soon for part 2.


[User] Please transcribe this text

[Assistant] Hi everyone, I'm your teacher Jesse and I'm back with part two of At Night. Remember we were talking about


[User] Please transcribe this text

[Assistant] The little girl and her dad going out at night. Yes. And what did they see? They saw stars. And they saw patterns in the stars, like the Big Dipper and the Little Dipper. Let's continue.


[User] Please transcribe this text

[Assistant] At night, that's right. Can you see the moon in the morning? No, usually you can't. You only see the moon when it's dark. 어두울 때 날 볼 수 있어요.


[User] Please transcribe this text

[Assistant] We can see the moon when it's dark. The moon looks different on different nights. Hmmm. One night, the moon is very small. One night, the moon is very big. Like this. Really? Hmmm. Let's see.


[User] Please transcribe this text

[Assistant] The full moon is bright. It helps us see. Alright, here we have full moon, right? The full moon is bright.


[User] Please transcribe this text

[Assistant] It's very bright. It helps us see.


[User] Please transcribe this text

[Assistant] It's very dark, but the moon is very bright, so it helps us see. We can see


[User] Please transcribe this text

[Assistant] Because the moon is bright. It helps us see.


[User] Please transcribe this text

[Assistant] One, two, three, four, five, six, seven, eight? Are there eight moons? No. How many moons are there? Right. There's only one moon. But, remember, on different nights,


[User] Please transcribe this text

[Assistant] There are different looking moons. The moon looks different. 다른 밤에 달이도 다르게 보여요.


[User] Please transcribe this text

[Assistant] Alright, these are the different looking moons. How the moons look different.


[User] Please transcribe this text

[Assistant] We call this the cycle of the moon. What is cycle? Cycle means start at one way and then we go many different ways and then we change again


[User] Please transcribe this text

[Assistant] Back to the first way.


[User] Please transcribe this text

[Assistant] Each cycle takes about 28 days.


[User] Please transcribe this text

[Assistant] Okay, first this, then this, this, this, this, this, this, and this. 28 days.


[User] Please transcribe this text

[Assistant] So what is the first part of the cycle? The first part of the cycle is right here.


[User] Please transcribe this text

[Assistant] Oh, it is difficult to see this moon. This moon is called a new moon. Alright? This is called the new moon.


[User] Please transcribe this text

[Assistant] So uhm, uh, uh, uh,


[User] Please transcribe this text

[Assistant] It is difficult to see. It's too dark. That's the new moon. What's the next one called? The next one is called the full moon. Okay? The full moon is very easy to see. 보기가 쉬워요. Right? Full moon. The full moon is easy to see.


[User] Please transcribe this text

[Assistant] Now we have Dad and the little girl.


[User] Please transcribe this text

[Assistant] Walking outside at night. And now, are they looking at stars? Nope, not stars. Are they looking at the moon? Nope, not the moon. Now they're looking at some animals. Are these birds? Ah, ah. Se yeyo? No. Bakchi yeyo. Right. These are called, do you know? Man.


[User] Please transcribe this text

[Assistant] Do you know mm men? Batman. Yeah, Batman. Is this Batman? No, that's not Batman, but it is.


[User] Please transcribe this text

[Assistant] Alright, uuuh. And we have another one down here. Right? And over here. What are those? No. These are nabang.


[User] Please transcribe this text

[Assistant] It's not a butterfly. Not a butterfly. This is called a moth.


[User] Please transcribe this text

[Assistant] M-O-T-H. Moth.


[User] Please transcribe this text

[Assistant] They are looking for moths to eat. Uh-huh. Looking for. 찾는 거예요. Alright. 먹을 나방을 찾아요. Who eats moths? Do you eat moths?


[User] Please transcribe this text

[Assistant] The bats are looking for moths to eat.


[User] Please transcribe this text

[Assistant] Moths fly at night too. Yes, bats fly at night, and moths fly at night too. Ah, bapmdongmulduri dashi nawathneyo. The night animals are here again. Alright, do you remember what name is this animal?


[User] Please transcribe this text

[Assistant] What kind of animal is this? In English, it's a


[User] Please transcribe this text

[Assistant] Bat! Fantastic, yes! Ding! These are bats. One bat, two bats.


[User] Please transcribe this text

[Assistant] Bats use a kind of sonar.


[User] Please transcribe this text

[Assistant] Hmm? Bats use a kind of sonar?


[User] Please transcribe this text

[Assistant] What is sonar? Okay. 박지들이 sonar 쓴다고 해요. That's used as a kind of sonar. It, it는 sonar


[User] Please transcribe this text

[Assistant] Helps them find moths. Why do bats find moths?


[User] Please transcribe this text

[Assistant] Sonar helps bats find moths. Alright?


[User] Please transcribe this text

[Assistant] Find moths. What is sonar? Well, 밤은 너무 어두웠죠. Yes, night time is very dark. 보기가 어려워요. It is hard to see. 박지도 못 봐요.


[User] Please transcribe this text

[Assistant] It's difficult for a bat to see too. So the bat makes a sound.


[User] Please transcribe this text

[Assistant] Very good. Do people have sonar? Can you use sonar? No? Right. But bats can use sonar.


[User] Please transcribe this text

[Assistant] Dolphins. Dolgore. Dolphin. Dolphins. Dolphins use sonar too. Mmhm.


[User] Please transcribe this text

[Assistant] It helps them find some food. Bats use sonar at night.


[User] Please transcribe this text

[Assistant] And that is everything for part two of At Night. Come see me again for part three.


[User] Please transcribe this text

[Assistant] Hi everyone, it's your teacher Jesse and I'm back with part three of At Nights.


[User] Please transcribe this text

[Assistant] As you can see, it is still night time.


[User] Please transcribe this text

[Assistant] And the little girl and dad are still outside the house. Right? What are they doing?


[User] Please transcribe this text

[Assistant] They're looking at stars, they're looking at the moon, and they were looking at some animals, right? They looked at bats, and they looked at moths, and now they found a new one. What are these?


[User] Please transcribe this text

[Assistant] Are those stars? Noooo. Stars are way up high in the sky. Right? These are something different. Let's find out.


[User] Please transcribe this text

[Assistant] We like to watch fireflies at night. We like their flashing lights.


[User] Please transcribe this text

[Assistant] Wow. Do you know fireflies? Here. Fireflies. Say it with me. Fireflies.


[User] Please transcribe this text

[Assistant] We like their flashing lights. 반짝반짝. flashing lights. 좋아해요. We like their flashing lights.


[User] Please transcribe this text

[Assistant] Their lights send messages to other fireflies. Uh-huh, uh-huh. 재밌죠? 다른 반디부리에게, light들이 문자처럼 메시지 보내요. Okay? Send messages. 친구에게 안녕하라고 하고 싶으면 어떻게 해요? 말하기. Right? 안녕!


[User] Please transcribe this text

[Assistant] Can't send a 문자 message and a firefly can't talk. So a firefly send messages with lights. 신기하죠. It's amazing.


[User] Please transcribe this text

[Assistant] 500 gae, cheon gae, manhwa yo, jincheo manhwa.


[User] Please transcribe this text

[Assistant] Fireflies are not real flies. Uh-huh, uh-huh. Fly is a fly. But a firefly is not a fly. Then why is it a firefly? I don't know. I don't know. They are a kind of beetle. Oh, I see.


[User] Please transcribe this text

[Assistant] Firefly는 딱정버레예요. Okay, it's a kind of beetle. 한가지 딱정버레예요. It's not a fly. It is a beetle. That's very interesting.


[User] Please transcribe this text

[Assistant] Look at this picture. Now, we have some trees, we have some rocks, we have a road, and we have some grass. But what are all of these things? 이런 반짝반짝 노란색, 녹색 진짜 천 마리 있어요. 천 개. 이거 뭐예요?


[User] Please transcribe this text

[Assistant] All fireflies. Wow! It's amazing! How many fireflies do you think there are? Firefly. 몇 개 있는 것 같아요? One hundred?


[User] Please transcribe this text

[Assistant] That would be really fun to catch some fireflies.


[User] Please transcribe this text

[Assistant] Oh, here's another animal. That's not a bat. It's not a moth. And it's not a firefly. This animal is a...


[User] Please transcribe this text

[Assistant] Cat. Right, it's a cat. Now, look at the cat's eyes. Wow, it's eyes are very bright. It's eyes are like lights.


[User] Please transcribe this text

[Assistant] Let's find out about the cat's eyes at night.


[User] Please transcribe this text

[Assistant] We like to watch our cat at night. Ah, 우리 고양이. That's their cat. Its eyes glow. Its eyes glow.


[User] Please transcribe this text

[Assistant] Alright, when light shines, this light, the flashlight goes on to the cat and its lights glow. 좀 무서워 보이지만 무섭지 않아요. 그냥 고양이에요. They are like mirrors. 아, 거울처럼요.


[User] Please transcribe this text

[Assistant] Right, it's like a mirror. The light comes into the eyes and then mirror처럼 뿅 나와요. Light shines off them. 왜 그렇게 돼요?


[User] Please transcribe this text

[Assistant] This helps our cat see. This helps our cat see. Okay? 이런 눈 때문에 쉽게 밤에 볼 수 있어요. 신기하죠? It's amazing. It's incredible. It's fascinating.


[User] Please transcribe this text

[Assistant] Let's look at these two different cat pictures. Look closely at the cat's eyes. Look at these eyes.


[User] Please transcribe this text

[Assistant] Alright, but look here. Here, the black part is big.


[User] Please transcribe this text

[Assistant] In the center of the eye is the pupil. Okay? 눈 중에 까만색 거. Pupil. Say it with me. Pupil. Excellent.


[User] Please transcribe this text

[Assistant] It gets bigger at night. Ah, bame deo kuge deyo. Alright, it gets bigger at night. This lets in more light. Aha, deo kuge deeseo deo shipge bohwayo. Okay, the cat can see better because the pupil is bigger. It lets in more light.


[User] Please transcribe this text

[Assistant] Here is a cat when the light is bright. Okay? 불이 많으면. Small pupils.


[User] Please transcribe this text

[Assistant] This is for bright light. Okay. 불이 많아서 small pupils. Here, dim light. 더워서 big pupils. Alright, now it's time to play find the animals.


[User] Please transcribe this text

[Assistant] Let's see what animal we can find first.


[User] Please transcribe this text

[Assistant] Finding animals in the dark is difficult. Let's try. Here's one. What animal is this? That is a mouse, right?


[User] Please transcribe this text

[Assistant] M. O. U. S. E. There's a mouse. Excellent.


[User] Please transcribe this text

[Assistant] Okay, we're going to follow Kevin into the observatory next to learn even more.


[User] Please transcribe this text

[Assistant] Hello, grammarians. Welcome to the last and strangest part of the irregular verb, the truly irregular. Yes, friends, here I have compiled all the weirdest, all the wooliest, all the eeriest and spookiest forms of verbs that don't otherwise fall into other categories.


[User] Please transcribe this text

[Assistant] So we can't say that they end with a changed ED.


[User] Please transcribe this text

[Assistant] We can't say that they end with an en, uh, and we can't say that there's a vowel shift. We've already covered those. This is the time for the weird stuff.


[User] Please transcribe this text

[Assistant] First up, U-G-H-T. Oh, what a strange collection of letters that is to be found in English. So we take a word like teach, and in the past tense, it's taught.


[User] Please transcribe this text

[Assistant] It's also pretty weird and pretty rare for there to be a vowel shift from the present to the past, and also a de sound. So for example, we take the word flee, which means to run away, and in the past it's fled. Likewise, in the present we say say, and in the past we say


[User] Please transcribe this text

[Assistant] Said. So that A becomes eh, and that E becomes eh. And it's this weird vowel shift that's also followed up by a duh sound.


[User] Please transcribe this text

[Assistant] There are some words for whom time does not exist.


[User] Please transcribe this text

[Assistant] These are verbs for whom the present tense is the same as the past tense. Prepare to have your mind blown. The past tense of bet is bet. The past tense of set is set. The past tense of hurt is hurt. Yeah, it's weird.


[User] Please transcribe this text

[Assistant] Finally, there are some helper verbs or auxiliary verbs called modals that are super weird and have these properties that aren't repeated anywhere else in English.


[User] Please transcribe this text

[Assistant] So present tense can becomes past tense could.


[User] Please transcribe this text

[Assistant] I can stand on my head, or I could stand on my head when I was five. May becomes might in the past.


[User] Please transcribe this text

[Assistant] And what's super weird about these L's in could, should, or would is listen to me saying them. You don't pronounce the L's. And this is the only place in English where that silent L shows up. It's so strange. Ah, I love it.


[User] Please transcribe this text

[Assistant] These are the irregular verbs and these, in fact, are the most irregular of the irregular.


[User] Please transcribe this text

[Assistant] If you can master these, you will be a grammar champion. And I believe in you. Because you can learn anything. David out.


[User] Please transcribe this text

[Assistant] Now we got our eggs and our butter. I have a pan right here. And is it this one?


[User] Please transcribe this text

[Assistant] So the pan's heating up a little bit, I'm gonna drop the butter in. Crank up the heat a little more. Smells really good. You guys smell that? Butter.


[User] Please transcribe this text

[Assistant] You don't have to do anything right here until you see the eggs are start- kind of starting to form.


[User] Please transcribe this text

[Assistant] No, not yet. When you scrape down, it still follows the spatula. What's today? Tuesday? Well, maybe it's trash day. Maybe we missed trash day.


[User] Please transcribe this text

[Assistant] Okay, you just kinda wanna flip it upside down. Let it cook.


[User] Please transcribe this text

[Assistant] You gotta wanna watch to not let it overcook right now.


[User] Please transcribe this text

[Assistant] Because we do want eggs to be a little runny when we put it on a plate. Otherwise it gets really dry.


[User] Please transcribe this text

[Assistant] I think that is good. We're going to take it off the heat. Decorate these here with a couple raspberries.


[User] Please transcribe this text

[Assistant] Pick the good ones. You want the pretty ones to be on a plate. These kind of have a sour taste to it. Goes really well for breakfast. Okay. And here you go. Breakfast. And if you do want pepper,


[User] Please transcribe this text

[Assistant] Egg. I will have some. Now is a good time to add it.


[User] Please transcribe this text

[Assistant] A milk for me. Here we go. Okay. A milk for here. And a water for here. Still got the morning mist on it.


[User] Please transcribe this text

[Assistant] You don't have to do anything right here until you see the eggs are starting to form.


[User] Please transcribe this text

[Assistant] 14th, or you can do even like 16th and uhm, just like two avenues over. So if you just go to 16th. From, from here? Yeaah. I would go maybe like two more down, and then take a right, and you'll see it's in Union Square.


[User] Please transcribe this text

[Assistant] Hello grammarians. Let's talk about the progressive aspect. So we talked about the simple aspect as something that is just the most bare form. It's what you see here. I walk, I will walk, I walked. But aspect allows us to talk about things that are ongoing.


[User] Please transcribe this text

[Assistant] And that's what we call the progressive because it's progressing, it's going, it's happening. Uhm, so if we are telling a story and we are inside that moment, we can use the progressive aspect. So I walk becomes in the present


[User] Please transcribe this text

[Assistant] I am walking. So the way the progressive works is that it takes the form of to be for whatever the subject of the sentence is, in this case, I, and it changes the verb into an ing verb. That's what it does. That's what the progressive does. And its effect is to say that something is ongoing.


[User] Please transcribe this text

[Assistant] This is also called the continuous aspect, uh, but I like to call it the progressive aspect. Uh, let's, let's try this in all the different basic conjugations. So we call this the present progressive.


[User] Please transcribe this text

[Assistant] Let's try the past progressive. So if it says, I walked, we would just take, uh, the verb to be and then put it in the past. So this part doesn't change. The walking doesn't change. You would say, I was walking.


[User] Please transcribe this text

[Assistant] Likewise for the future. So we're not gonna change the walking part. We're just gonna put this am part into the future, which is like so. I will be walking. That's the future progressive.


[User] Please transcribe this text

[Assistant] So the way to remember the progressive aspect is for me to hideously butcher the writing.


[User] Please transcribe this text

[Assistant] ...of David Mamet and tell you to always remember your ABCs. Always.


[User] Please transcribe this text

[Assistant] And conjugating here is just a word that means, uh, to put


[User] Please transcribe this text

[Assistant] Verbs in different tenses and aspects, but I really want you to focus on the fact that we've got this B and this ing.


[User] Please transcribe this text

[Assistant] So just remember be and ing, and that's how you form the progressive. So no matter whether or not it's happening in the past, it's still I was walking. So the part that changes is the, is the be, is the verb to be. I was walking, I am walking, I will be walking. The part that doesn't change is the walking.


[User] Please transcribe this text

[Assistant] And that's how you express that something is ongoing. That something is continuously happening in the telling of the story. Understanding this will enable you to master time. You can learn anything. David out.


[User] Please transcribe this text

[Assistant] You'll have to take care of your meal in the van by yourself and stay the night at a campsite bon voyage. Oh wow.


[User] Please transcribe this text

[Assistant] I see. And then when I am not in the car, let's say we go walk around, is it really important to turn those off or it doesn't really matter? For the battery, maybe?


[User] Please transcribe this text

[Assistant] Oh, perfect. Okay, and then is this water okay for drinking?


[User] Please transcribe this text

[Assistant] Got it. I was wondering, is it advisable to put all the bed things away when you're driving?


[User] Please transcribe this text

[Assistant] If you are all done sharing information about this RV, I have no more further questions, so... That's perfect. So you're ready for your trip? I'm ready for my trip, yes. Thank you so much for all of your help today. Not a problem at all. I appreciate it. Enjoy your trip. Thank you. Okay. Well, maybe I'll tuck in for an hour.


[User] Please transcribe this text

[Assistant] Wow, it was so much fun driving along the Great Ocean Road and now here we are at the Great Otway National Park. Right over there I can see a lighthouse. I think this yellow rain flicker is pretty appropriate.


[User] Please transcribe this text

[Assistant] You know, I am feeling a little bit hungry, so perhaps I should go back to the RV and prepare some dinner. Care to join me? Okay, let's go.


[User] Please transcribe this text

[Assistant] Now I remember, I remember when I first met you all. Always reminded of myself a little.


[User] Please transcribe this text

[Assistant] Fine. Just so you know, he's a bloody coward.


[User] Please transcribe this text

[Assistant] As I walked up to that door, a million thoughts raced through my mind. Unfortunately, one particular thought did not.


[User] Please transcribe this text

[Assistant] I asked her about it years later, and yeaah, that was the signal. I could have kissed her.


[User] Please transcribe this text

[Assistant] But that's the funny thing about destiny. It happens whether you plan it or not.


[User] Please transcribe this text

[Assistant] I mean, I never thought I'd see that girl again, but it turns out I was just too close to the puzzle to see the picture that was forming. Because that, kids, is the true story of how I met your Aunt Robin.


[User] Please transcribe this text

[Assistant] Will you relax? I'm getting to it. Like I said.


[User] Please transcribe this text

[Assistant] Oh, uhm, two blocks that way and take a right.


[User] Please transcribe this text

[Assistant] I don't expect many of you to appreciate the subtle science and exact art that is potion making. However, for those select few who possess the predisposition


[User] Please transcribe this text

[Assistant] I can teach you how to bewitch the mind and ensnare the senses. I can tell you how to


[User] Please transcribe this text

[Assistant] However, for those select few who possess the predisposition


[User] Please transcribe this text

[Assistant] I can teach you how to bewitch the mind. I can tell you how to


[User] Please transcribe this text

[Assistant] I can teach you how to bewitch the mind and ensnare the senses. I can tell you how to


[User] Please transcribe this text

[Assistant] Let's fall in love and get married and have kids and drive them to soccer practice.


[User] Please transcribe this text

[Assistant] It's a great look, but you're looking at the wrong girl. No, I'm not. Yes, you are. I don't want to get married right now. Maybe ever. And if we got together, I'd feel like I'd either have to marry you or break your heart. And I just couldn't do either of those things. Just like you can't turn off the way you feel.


[User] Please transcribe this text

[Assistant] I know it sounds insincere when people say that, but we could.


[User] Please transcribe this text

[Assistant] I'm sorry, I only moved here in April and I'm always working and I just haven't met a lot of good people so far.


[User] Please transcribe this text

[Assistant] Hello boys and girls. My name is Larry. Today we will study Brain Bank Science Book Number 17. And the title of this book


[User] Please transcribe this text

[Assistant] Can you read this with me? Prudence from Peru. I'm gonna give you one tip.


[User] Please transcribe this text

[Assistant] Prudence is the name of an animal. Prudence is the name of an animal. Now Peru. Peru is a country. Do you know where Peru is? Is Peru in South Korea? No. Peru is in South America. Let's look at this picture. Who can we see? We can see dad.


[User] Please transcribe this text

[Assistant] Mom, daughter, and son. How about the animals? Can you name all of the animals? Let's try. This is a sheep, sheep. Here, with the horns, this is a cow. We get milk from a cow.


[User] Please transcribe this text

[Assistant] We have two chickens. One here and one here. Who's sitting next to the chicken? This is a dog. Now, very difficult. Can you see inside here? There are two more animals. One, two.


[User] Please transcribe this text

[Assistant] Do you know the names of those animals?


[User] Please transcribe this text

[Assistant] I don't know. I have to read the story to find out. But how many animals can we see? Let's count. One, two, three, four, five, six, seven. And it looks like a very nice day. Let's get started with the story.


[User] Please transcribe this text

[Assistant] Can you see any new animals in this picture? Hmm. Can you find them? There's two more. Very good. There are two butterflies. Two butterflies.


[User] Please transcribe this text

[Assistant] And we have another cow. We have two cows. One, two. How many chickens can you see? Only one. But how many sheep can you see? Two. One, two. Now, who is driving this? What is this? Is this a car? No, we can say a truck.


[User] Please transcribe this text

[Assistant] Or, you can say, I'll give you a special word. Pickup truck. Because of this part here. But who is driving? Is it a man like me? No, it is a woman. Now, does she have brown hair? No. Black hair? No. Does she have yellow hair?


[User] Please transcribe this text

[Assistant] Yes, but we don't say yellow. We say blonde. She has blonde hair. Let's look at the next page. Wow! Where are they? Are they in a city?


[User] Please transcribe this text

[Assistant] Are they on a farm? Yes, they are on a farm. What is the dad doing? The dad is carrying hay. What is the mom doing?


[User] Please transcribe this text

[Assistant] She is carrying something. We don't know what it is.


[User] Please transcribe this text

[Assistant] So is the daughter, and the son, the boy.


[User] Please transcribe this text

[Assistant] Can we find any more animals? No, we learned all of them. Let's read the story.


[User] Please transcribe this text

[Assistant] There was great excitement on the farm.


[User] Please transcribe this text

[Assistant] To feel excitement is to feel happy. You're really, really energized. Maybe before you go on a vacation, you feel excitement. It's a feeling. Kind of like sad or happy. Excited.


[User] Please transcribe this text

[Assistant] Someone new is coming today, said dad. Someone new. Was it a human person like me?


[User] Please transcribe this text

[Assistant] No, it's probably the animal in the truck. Remember we saw that animal before? Who is it? asked the children. Wait and see, said mom.


[User] Please transcribe this text

[Assistant] Oh, so they have to wait. They're getting excited. What do you think are in these?


[User] Please transcribe this text

[Assistant] These, we can call them a pail or a bucket. A pail or a bucket. But what's inside? Do you have any guesses? Let's find out.


[User] Please transcribe this text

[Assistant] The children ran outside to wait. They're waiting for the new guest. The sheep were baaing. This is the sound that sheep make. Can you make a sheep sound? Let's practice. Baa. Baa. Can you try? Very good. The cows were mooing.


[User] Please transcribe this text

[Assistant] This is the sound a cow makes. Can you try that? There you go. A little quieter. The chickens were clucking.


[User] Please transcribe this text

[Assistant] Can you try to make the sound of a chicken? We can even move our arms like this.


[User] Please transcribe this text

[Assistant] There's even a dance that you can do that looks like a chicken.


[User] Please transcribe this text

[Assistant] Do the animals look sad or happy?


[User] Please transcribe this text

[Assistant] They want to meet the new animal. They want to see who is coming. You can see the truck is coming down the road. This chicken, what is that chicken doing? That chicken is eating. And we can see this chicken is running.


[User] Please transcribe this text

[Assistant] The cows and the sheep are looking at something. Let's continue with our story.


[User] Please transcribe this text

[Assistant] We have a big red truck. And the boy is looking inside.


[User] Please transcribe this text

[Assistant] Can you see the color of this animal?


[User] Please transcribe this text

[Assistant] Is it yellow? Like the chicken? No?


[User] Please transcribe this text

[Assistant] It's kind of a brownish or golden color.


[User] Please transcribe this text

[Assistant] Let's find out more about this animal.


[User] Please transcribe this text

[Assistant] A truck came rattling into the yard. Rattling. This has many different meanings. It means to make noise.


[User] Please transcribe this text

[Assistant] Was very noisy coming into the yard. The yard where everybody was. The cows looked up. The sheep looked up. The chickens looked up too. The children ran to the truck. They're all very excited.


[User] Please transcribe this text

[Assistant] Are you getting excited? Do you know what kind of animal it is? I don't know.


[User] Please transcribe this text

[Assistant] They saw two sets of eyes. Two sets. One, two. That equals one set.


[User] Please transcribe this text

[Assistant] You have one set of eyes, but you have two eyes.


[User] Please transcribe this text

[Assistant] So, I have one set of eyes. You have one set of eyes.


[User] Please transcribe this text

[Assistant] That equals two sets of eyes. That means there are two animals inside this truck.


[User] Please transcribe this text

[Assistant] Hmm, we can see one here and one there.


[User] Please transcribe this text

[Assistant] They saw two long necks. What animal has a very long neck? Can you help me?


[User] Please transcribe this text

[Assistant] Very good. Are they giraffes? asked Kelly. Mom and dad laughed. So the girl's name is Kelly. This is Kelly. Hi Kelly.


[User] Please transcribe this text

[Assistant] They're not giraffes. If they were giraffes, their necks would be outside. We couldn't see them. What else? What other animal has that color? A camel? Did you see humps like a camel? Camels have humps like that. Hmm, maybe it's a camel.


[User] Please transcribe this text

[Assistant] Well that's it for part one. We have to read part two to find out what kind of animal this is. I'll see you again very shortly. Goodbye.


[User] Please transcribe this text

[Assistant] Hello boys and girls. Welcome back to part two of Prudence from Peru.


[User] Please transcribe this text

[Assistant] Now in part one, did we find out what kind of animal was in the truck?


[User] Please transcribe this text

[Assistant] Not yet, but hopefully we can find out here. Let's look at this picture. What can we see? We see dad and mom. We see the boy or the son. Do you remember her name? We learned it. Very good. Her name is Kelly. We have a chicken. Actually, two chickens. One, two. One dog.


[User] Please transcribe this text

[Assistant] What is the name of this animal here? Very good. A sheep. One sheep.


[User] Please transcribe this text

[Assistant] And a very happy cow. But look at this animal. Do you know the name of that animal? I don't know. I have to read the story to find out. But look at their fur. Does it look like the cow? Hmm, maybe it's a little bit longer. Does it look like the same as a chicken?


[User] Please transcribe this text

[Assistant] Do you think this animal is a bird? I don't think so. Maybe it's a baby cow. No? You don't agree with me? Let's find out. Let's read the story.


[User] Please transcribe this text

[Assistant] Dad let down the ramp. This is the ramp. Before, it was up, like this. And then, it came down. And now, the animal can walk out from the, on the back of the truck. A little animal appeared. This is the little animal.


[User] Please transcribe this text

[Assistant] It had long, long lashes.


[User] Please transcribe this text

[Assistant] If you look closely, you can see the lashes. And it stared at the children. Maybe this animal is afraid. Maybe this animal is scared. Or maybe this animal loves the children. Let's read some more of this book.


[User] Please transcribe this text

[Assistant] Like a jacket like you wear? Or a jacket like I wear? No. Remember...


[User] Please transcribe this text

[Assistant] So to have a long coat, it means the hair is long.


[User] Please transcribe this text

[Assistant] The coat of a cow is short. It had a long neck too. Long neck. Longer than a dog. Longer than me. Longer than a chicken.


[User] Please transcribe this text

[Assistant] But it wasn't a giraffe. A giraffe's neck is very, very long. Maybe as long as this. So it's not a giraffe. Hmmm. What is the name of this animal? Let's look at the next page.


[User] Please transcribe this text

[Assistant] What could it be? I don't know. Do you know?


[User] Please transcribe this text

[Assistant] Meet Prudence from Peru, said Mom. This is Prudence. This is the animal's name. Hi Prudence. What kind of animal is Prudence?


[User] Please transcribe this text

[Assistant] Wow, here we have a very big farm.


[User] Please transcribe this text

[Assistant] Do you know the name of this? It is wood. We call that a fence.


[User] Please transcribe this text

[Assistant] We use a fence usually to keep animals inside. Maybe this is where prudence will live. We can see the two chickens, the dog, the mom, there's Kelly, the son, the cow, the sheep, another cow, and another sheep. There are many animals. Can you count them with me? Are you ready?


[User] Please transcribe this text

[Assistant] Five, six, seven, eight, nine. There are nine animals. Wow. Let's read some more.


[User] Please transcribe this text

[Assistant] A bigger animal came out behind the baby animal. Is this the baby or is this the bigger animal? Very good. This is the baby.


[User] Please transcribe this text

[Assistant] It went hum, hum, hum, hum, hum, hum. Hum, hum, hum, hum, hum. Can you make that sound? Hum, hum, hum, hum. Hum, hum, hum, hum. What kind of animal goes hum, hum, hum, hum? Do you remember which animal goes baa, baa? Very good. A sheep. How about


[User] Please transcribe this text

[Assistant] Very good. A chicken. But what animal goes hum, hum, hum, hum? Hmm. I don't know.


[User] Please transcribe this text

[Assistant] That is the baby's mother, said mom. She makes that humming noise when she is afraid. Oh no. They make that noise when they are scared. They are frightened. They are afraid. Uh oh. Let's hope they are not afraid the whole story.


[User] Please transcribe this text

[Assistant] Maybe you get afraid sometimes in the dark. Oh, let's continue reading.


[User] Please transcribe this text

[Assistant] Dad put the strange animals in the field. Strange. Strange means that they are different. You don't know this kind of animal. After you learn about this animal, they are not strange anymore. It's only because this animal is different.


[User] Please transcribe this text

[Assistant] We don't learn, we haven't learned about this animal. The cows came to look. What kind of animal is that? The sheep came to look. What kind of animal is that? The chickens came to look too. What kind of animal is that? No one.


[User] Please transcribe this text

[Assistant] Oh! The mom and the baby!


[User] Please transcribe this text

[Assistant] Look at their long coat. Their fur is very long. It's not short.


[User] Please transcribe this text

[Assistant] Does the baby look happy now? Yes. Is the baby afraid? No. We can see a smile.


[User] Please transcribe this text

[Assistant] Usually people and animals do not smile when they are afraid.


[User] Please transcribe this text

[Assistant] I hope they are no longer afraid.


[User] Please transcribe this text

[Assistant] What are they? Asked Joe. They are alpacas, said Dad. Alpaca. Let's pronounce that word together. Alpaca. Alpaca. Have you seen an alpaca before? I haven't. This is my first time.


[User] Please transcribe this text

[Assistant] Where do they come from? asked Kelly. So the little boy asked what are they?


[User] Please transcribe this text

[Assistant] And the little girl asks where do they come from. Do you remember where they come from? I'll give you a hint. It's in the title of the book. Very good. They come from Peru.


[User] Please transcribe this text

[Assistant] You're very smart. It's in South America. Let's continue with our story.


[User] Please transcribe this text

[Assistant] They come from Peru. You were correct. In South America. We can look up Peru in an atlas. Look up. Look up.


[User] Please transcribe this text

[Assistant] No, look up means to find or locate. Look in a book. If you have a dictionary, maybe you look up a word. Ah, alpaca, an animal from Peru.


[User] Please transcribe this text

[Assistant] In an atlas. An atlas is a book of maps. A book of maps.


[User] Please transcribe this text

[Assistant] Maybe you have an atlas at your school. Wow! We learned a lot today. What kind of animal is this? Very good. It's an alpaca. That's it for part two.


[User] Please transcribe this text

[Assistant] We're gonna learn more about the alpacas in part three. I'll see you again very shortly.


[User] Please transcribe this text

[Assistant] Welcome back to part three of the book Prudence from Peru.


[User] Please transcribe this text

[Assistant] We finally learned what type of animal prudence is. Prudence is an alpaca. Can you say alpaca? Alpaca. And where is prudence from? The country of Peru. Now let's read more in this story.


[User] Please transcribe this text

[Assistant] Mom got a bowl of pellets. Pellets. Do you know this word? Pellets are round shaped something. In this story, they are food.


[User] Please transcribe this text

[Assistant] Small little rounded shaped pieces of food. Maybe


[User] Please transcribe this text

[Assistant] You're candy. You eat candy pellets.


[User] Please transcribe this text

[Assistant] There are many different kinds of pellets in the world. In this story, food pellets.


[User] Please transcribe this text

[Assistant] She showed the children how to feed the alpacas. Feed means to give food. Your mom and dad feed you. My mom and dad feed me. They give me food.


[User] Please transcribe this text

[Assistant] So here are the pellets, the food pellets, right there.


[User] Please transcribe this text

[Assistant] And they're holding the bowl to feed the alpaca. Look how happy the baby is. Smiling. In this pail, we can see more food pellets. Everybody is very happy now.


[User] Please transcribe this text

[Assistant] Mother alpaca likes the pellets, said Kelly. She's eating them and she's smiling. Of course she's happy. Prudence is sniffing my hair. Sniffing. You can sniff too.


[User] Please transcribe this text

[Assistant] Making that noise. Smelling. Very quickly, like this.


[User] Please transcribe this text

[Assistant] So Prudence is smelling his hair. Why? I don't know. It smells different. And Joe laughed. This is Joe and this is Kelly. Let's read the next page.


[User] Please transcribe this text

[Assistant] Found out more about alpacas.


[User] Please transcribe this text

[Assistant] They found out more. They learned.


[User] Please transcribe this text

[Assistant] You are finding out more now. You are learning. How did they learn more? From the computer. You can find a lot of information about many things using your computer. You can look on the internet.


[User] Please transcribe this text

[Assistant] You can read their alpaca notes. You can see a paca there.


[User] Please transcribe this text

[Assistant] So they are learning more about this animal. It's the first time they have seen an alpaca. Remember the book Atlas? It's right here. What kind of book is an Atlas? It's a book that has many maps.


[User] Please transcribe this text

[Assistant] Let's learn more on the next page. Here we have alpaca notes.


[User] Please transcribe this text

[Assistant] These are the notes that Joe and Kelly wrote for us to learn.


[User] Please transcribe this text

[Assistant] Alpacas come from the mountains of Peru. The mountains. The mountains. Very big mountains. They live in the mountains. It is cold there. Is it cold where you live? Maybe sometime.


[User] Please transcribe this text

[Assistant] The higher we go, the colder it gets. Maybe that's why


[User] Please transcribe this text

[Assistant] Alpacas have long coats.


[User] Please transcribe this text

[Assistant] They have long fur to keep them warm. You can see the clothing of these two people. This is traditional clothing for the people who live in Peru. Maybe it's like a home book for you. And we can see here is Peru in South America.


[User] Please transcribe this text

[Assistant] If you live in Korea, you live over here. Very, very far, very far away from


[User] Please transcribe this text

[Assistant] Let's learn more about alpacas. Let's read this together.


[User] Please transcribe this text

[Assistant] Alpacas have long, woolly coats that keep them warm.


[User] Please transcribe this text

[Assistant] Long, not short, and woolly. Wool is the type of fur that comes from this animal. We can call it wool. It's the same type of fur that comes from a sheep. And we use the wool of this animal to make many different things. This fur, or this coat, keeps the alpaca


[User] Please transcribe this text

[Assistant] Because it's cold on the mountains where they live. Let's read some more. Let's read together.


[User] Please transcribe this text

[Assistant] Alpacas are good farm animals. This means they like to live on the farm. They don't have to be in the wild.


[User] Please transcribe this text

[Assistant] Now, they eat grass and alpaca pellets. Do you eat grass? I don't.


[User] Please transcribe this text

[Assistant] Do you know another animal in the story that eats grass? Chickens? No. Dogs? No. Give you a hint. Very good. Cows eat grass.


[User] Please transcribe this text

[Assistant] And they eat alpaca pellets. And alpaca


[User] Please transcribe this text

[Assistant] If you remember, a pellet is a small round piece of food.


[User] Please transcribe this text

[Assistant] So this is a small round piece of food made for


[User] Please transcribe this text

[Assistant] Alpacas. Not for me, not for you, not for cows, just what alpacas like.


[User] Please transcribe this text

[Assistant] Farmers shear alpacas for their soft wool. Shear


[User] Please transcribe this text

[Assistant] This farmer is shearing this alpaca. Cutting off. It doesn't hurt the alpaca. They cut off their fur. They cut off their coat to do what?


[User] Please transcribe this text

[Assistant] The wool is made into soft, warm cloth. We can make clothing, a shirt, a scarf, a sweater, just like with a sheep.


[User] Please transcribe this text

[Assistant] So maybe in the summertime, the alpaca is very happy to have their wool cut off, sheared, because they will feel cooler.


[User] Please transcribe this text

[Assistant] You can see the farmer cutting the wool off in this picture.


[User] Please transcribe this text

[Assistant] Okay, let's go over a few words that we learned in the story. Humming. Humming is making this noise. That is humming. Now remember, the baby was making that noise


[User] Please transcribe this text

[Assistant] Because the baby, or prudence, was scared. Hum, hum, hum, hum, hum, hum, hum, hum. You can hum too. Hum, hum, hum, hum, hum, hum. You can try now.


[User] Please transcribe this text

[Assistant] Pellets, small round pieces of food.


[User] Please transcribe this text

[Assistant] Peru. Peru is a country. Peru is a country where? Which continent? North America? No. Europe? No.


[User] Please transcribe this text

[Assistant] Is the type of fur that alpacas have.


[User] Please transcribe this text

[Assistant] And we use this to make warm clothing for us, for me and you.


[User] Please transcribe this text

[Assistant] A note from the author of this story.


[User] Please transcribe this text

[Assistant] Are you ready? Do you have your reading glasses on? Let's read together. On our farm, we have 30 alpacas.


[User] Please transcribe this text

[Assistant] So maybe this is the author of this story.


[User] Please transcribe this text

[Assistant] And on the farm they have 30. 30 alpacas. That's a lot. They are beautiful animals. Beautiful. This has many different meanings. Maybe the way they look. They look very beautiful. But also the way they behave. The way they act.


[User] Please transcribe this text

[Assistant] They're not ferocious, rrrr, like a bear or a tiger. They're kind and gentle. You can pet them. You can touch them. It's okay.


[User] Please transcribe this text

[Assistant] But be careful because they are animals. We don't know what they can do. They like the other animals.


[User] Please transcribe this text

[Assistant] Alpacas like friends. I love to have friends. Do you like friends?


[User] Please transcribe this text

[Assistant] Maybe we can be friends with an alpaca.


[User] Please transcribe this text

[Assistant] Alpacas are very nosy. Nosy. Hmm. What does that mean?


[User] Please transcribe this text

[Assistant] What are you doing? What are you doing? What are you doing? The alpacas want to know everything. Are you nosy? Sometimes?


[User] Please transcribe this text

[Assistant] Sometimes I am nosy. I want to know what everybody is doing.


[User] Please transcribe this text

[Assistant] Well that's it for this story of prudence from Peru.


[User] Please transcribe this text

[Assistant] We were able to learn about alpacas, how they act, what they look like, and where they're from.


[User] Please transcribe this text

[Assistant] I hope you enjoyed learning about alpacas. I'll see you in the next book. Goodbye!


[User] Please transcribe this text

[Assistant] Nice to meet you brother. Everyone always says, oh Kevin that's my son's name, oh that's my best friend's name. Check this out, what's your favorite color?


[User] Please transcribe this text

[Assistant] Where you from? Originally from Dallas. Originally from Dallas?


[User] Please transcribe this text

[Assistant] Yo what's going on guys, Tanmay here for simple snippets and welcome back to another video tutorial on data structures and algorithms and we're gonna continue with the tree data structure and as the title of the video suggests


[User] Please transcribe this text

[Assistant] How it is different from other conventional linear data structures. We also briefly talked about binary tree because


[User] Please transcribe this text

[Assistant] We're gonna see a lot of binary tree data structure variants as we move ahead in this tutorial course. So it's about time that we take a detailed look at binary tree data structure and understand in depth about its different terms, about its different properties, about how it is implemented and different variants. So with that being said, let's get started.


[User] Please transcribe this text

[Assistant] If you're new to my channel, my name is Tanmay Sakpal and I do a lot of computer science and information technology video tutorials like computer programming, development, technology talks and a lot more on this channel. So if that's something you're interested into, then definitely subscribe and turn on the notifications to get the latest updates and never miss out on such important topics. So quick definition to binary tree, which we've already seen, but just to reiterate,


[User] Please transcribe this text

[Assistant] A binary tree, as the name suggests, is a tree data structure in which each node has at most two children, which are referred to as left child and right child. Okay, so it's a special type of tree.


[User] Please transcribe this text

[Assistant] So in general, a generic tree can have multiple children. So every node, you know, it can have 1, 2, 3.


[User] Please transcribe this text

[Assistant] And n number of children, but binary tree is a special kind of tree.


[User] Please transcribe this text

[Assistant] Where you can have only two children per node. Okay, so that's the unique definition of a binary tree.


[User] Please transcribe this text

[Assistant] And now let's try to figure out some more important terms and properties of a binary tree. So on the right hand side you can see we have a binary tree, we have the root node which is numbered as number 1. For the root node,


[User] Please transcribe this text

[Assistant] Number 2 and number 3 are the nodes which are left child named as LC. I'll give short term as LC and RC for the right child.


[User] Please transcribe this text

[Assistant] So you can see we have only 2 nodes. For this node number 2, we have 4 and 5 as LC and RC.


[User] Please transcribe this text

[Assistant] For node 3, we have 6 and 7 as LC and RC.


[User] Please transcribe this text

[Assistant] And lastly, for node 6, we only have a left child, we do not have a right child, okay. So that part, programmatically, if you see, it is gonna be null. So of course a binary tree can have one child, but it cannot have more than two.


[User] Please transcribe this text

[Assistant] So the condition is you cannot have more than two. You can have none or you can have one child. So you can see the leaf nodes do not have any children. So that is also valid. It is just that it cannot have more than two children. Alright, so that's the definition.


[User] Please transcribe this text

[Assistant] So first point, a binary tree is called a strict proper binary tree when each node has 2 or 0 children.


[User] Please transcribe this text

[Assistant] So a variation in binary tree is, a binary tree is called a strict or a proper binary tree when each node has 2 or 0 children.


[User] Please transcribe this text

[Assistant] So currently in our example, you can see that this node 6 has one child. So hence it is not a strict or proper binary tree.


[User] Please transcribe this text

[Assistant] So what can be a strict or proper binary tree? Let's see some variants. So over here in this first example, I have one single node. Let's call it root because


[User] Please transcribe this text

[Assistant] That's where we start with the tree data structure. I'll name it one. And you can see it does not have


[User] Please transcribe this text

[Assistant] Which means that it is also a strict or proper binary tree. Let's take a look at this. Example 2. Over here, if this is the root, if we start from over here, and this is the second node and this is the third node,


[User] Please transcribe this text

[Assistant] This can be considered as a binary tree. Of course it is falling in the definition. A binary tree states that each node can have at most two children. So it can obviously have one children. So this root node has a left child. Then node 2 also has a left child. They do not have a right child. This also doesn't have a right child.


[User] Please transcribe this text

[Assistant] And this is the leaf node so it doesn't have a left or right children.


[User] Please transcribe this text

[Assistant] But this is also a binary tree, because it falls under the definition. But is it a strict or a proper binary tree? No.


[User] Please transcribe this text

[Assistant] Because it has to have either two children, that is every node should have either two children or no children. They cannot have one child. So this is again not a strict binary tree. Let's take a look at this.


[User] Please transcribe this text

[Assistant] Just by looking at it, you can see that this is also not a strict binary tree because let me number it. Node 2 and 3 have only single children. So if there were a right child and a left child like this, so then it would be a strict or a proper binary tree. Okay.


[User] Please transcribe this text

[Assistant] So if you are wondering why we are learning these terms, it is because these terms will be used further.


[User] Please transcribe this text

[Assistant] And of course some of the variations, that is some of these variants also have their unique properties. So it's better to, you know, understand and keep these terms in mind.


[User] Please transcribe this text

[Assistant] Let's move to point number 2. A binary tree is called a complete binary tree if all levels except the last are completely filled and all nodes are as left as possible. Okay, so we just saw what is a strict or a proper binary tree.


[User] Please transcribe this text

[Assistant] Let's understand what is a complete binary tree. So complete binary tree states that it is a binary tree if all levels, so when I say level,


[User] Please transcribe this text

[Assistant] You start from level 0 as the root. So let's take an example. So over here if you see, this is the root. Okay. So the root usually is considered as level 0. Okay.


[User] Please transcribe this text

[Assistant] Once we traverse from root to the immediate child, it is considered as level 1. And then we have level 2. Okay?


[User] Please transcribe this text

[Assistant] So what this second point is saying is a binary tree is called complete binary tree if all levels except the last are completely filled and all nodes are as left as possible. So over here looking at this level 0.


[User] Please transcribe this text

[Assistant] That is root node 1, it has 2 children, which is the maximum a binary tree has per node. So this is full, which means that you cannot have more children.


[User] Please transcribe this text

[Assistant] Then coming at level 1, observing node 2 and 3, both 2 and 3 have 2 2 children. So they cannot have more than 2. Which means they're full. That is, they're completely filled.


[User] Please transcribe this text

[Assistant] And below that obviously there is no nodes because that is the last level, level 2.


[User] Please transcribe this text

[Assistant] So 4, 5, 6 and 7 nodes are leaf nodes. So is it a complete binary tree? Yes, because all levels except the last are completely filled. Except the last which means the last level which is at leaf position because obviously since it is a leaf node it will not have any children.


[User] Please transcribe this text

[Assistant] But all other nodes are completely filled which means they each have two children. Now there is one more condition that is if they are not completely filled, they need to be as left as possible. So what does this mean? So taking this example, again starting from root, let's say this is the root.


[User] Please transcribe this text

[Assistant] Level 1, 4, 5, 6, 7 are at level 2 and 8 is at level 3. Okay, makes sense? Now, is it a complete binary tree? If you observe level 0, level 1 are completely filled, which means each node at level 0 and level 1 have 2 children.


[User] Please transcribe this text

[Assistant] But this is not to the extreme left. When you talk about level 3 that is the last level, it has to be at the extreme left which means that this


[User] Please transcribe this text

[Assistant] 8 has to come over here and it has to be left child LC for this node 4. Only then it can be considered as a complete binary tree. But since there is some room left to the left side,


[User] Please transcribe this text

[Assistant] Right child, okay, remember it cannot come to the right when you have some place at the left.


[User] Please transcribe this text

[Assistant] So in case you don't have a place at the left, let's say 8 is over here and you want to add one more node, which is node 9. So you cannot add node 9 as the left child over here.


[User] Please transcribe this text

[Assistant] As long as you have some place for the right child at this place. So 9 should come over here because there is some place towards the left.


[User] Please transcribe this text

[Assistant] Okay, so when you fill in nodes, they have to start from left to right. So the leftmost node at level 2.


[User] Please transcribe this text

[Assistant] Will get filled first starting from left to right that is left child first then right child and then you move to the next node. Then you fill these two and then you move ahead. Okay, and that's how you get a complete binary tree.


[User] Please transcribe this text

[Assistant] So again, repeating the definition, a binary tree is called complete binary tree if all levels except the last are completely filled. So the last one, if it is incompletely filled, that is okay, but it has to be as left as possible.


[User] Please transcribe this text

[Assistant] Which means that the node at the last level has to be at the leftmost side. Okay?


[User] Please transcribe this text

[Assistant] So that defines a complete binary tree. And the last one is a binary tree is called a perfect binary tree.


[User] Please transcribe this text

[Assistant] If all levels are completely filled with two children, of course, when I say all levels, it means that


[User] Please transcribe this text

[Assistant] But level 3 has only one node, so this is not a perfect binary tree. It would be a perfect binary tree if...


[User] Please transcribe this text

[Assistant] Now this binary tree can be considered as perfect binary tree where every node has two children each. Okay?


[User] Please transcribe this text

[Assistant] Of course leaving the last level because at the last level we have the leaf nodes. So I hope these three different


[User] Please transcribe this text

[Assistant] Types of binary tree depending upon the number of nodes and the arrangement is very clear. Let's move forward. Now here's another property of binary tree.


[User] Please transcribe this text

[Assistant] Which is point number four. Which says maximum number of nodes at any level x.


[User] Please transcribe this text

[Assistant] This binary tree, which is also a perfect binary tree because if you observe, all the levels have completely filled with the nodes. So this is root, this as I mentioned is at level 0, this is at level 1 and this is at level 3. Okay, so maximum number of nodes at


[User] Please transcribe this text

[Assistant] Level x is equal to 2 raise to x. So let's test this at level 0. So at level 0, that is when x equals to 0, what is 2 raise to 0? It is equal to 1.


[User] Please transcribe this text

[Assistant] So you can see we have only one node at level 0 which is obviously the root node. So when x equals to 1, we have to say 2 raise to 1 which is equal to 2. So at level 1 you can see we have


[User] Please transcribe this text

[Assistant] Maximum of two nodes. Obviously, below the root


[User] Please transcribe this text

[Assistant] We can only have two nodes as maximum number because that's the definition of a binary tree.


[User] Please transcribe this text

[Assistant] When we say x equals to 2, it is 2 raise to 2 which is 4.


[User] Please transcribe this text

[Assistant] So at level 3, you can see it is completely filled, which means you cannot add more than


[User] Please transcribe this text

[Assistant] These number of nodes and these number is 4. So this is a basic formula.


[User] Please transcribe this text

[Assistant] Moving on to another formula or another property. So for a binary tree, maximum number of nodes with height h.


[User] Please transcribe this text

[Assistant] Is given by this formula 2 raised to 0, which is at level 0. Plus 2 raised to 1, which is at level 1. Plus, then it keeps on going. And 2 raised to h is the height. I hope you know what is the height of a tree.


[User] Please transcribe this text

[Assistant] We've seen it in the previous tutorial, that is the definition. So the height of the tree is defined as


[User] Please transcribe this text

[Assistant] The height of the root node and the height of the root node is


[User] Please transcribe this text

[Assistant] And we have to take the maximum number of edges which comes between the root node till the leaf node. So, the root node is node 1. And let's say this is the leaf node because


[User] Please transcribe this text

[Assistant] We have only three levels, so the height is gonna be this one edge because we go from one to two, so this is one. And then we go from two to four, so this is two. So height is gonna be two, okay.


[User] Please transcribe this text

[Assistant] So the height of this tree is gonna be 2 and not 3. We have 3 levels but the height is 2. Okay? Don't get confused. And the formula is as follows 2 raise to 0 plus 2 raise to 1 plus 2 raise to h. Which when condensed we get 2 raise to h plus 1 and then we have minus 1. So let's try to apply this formula. We know the height of the tree over here is 2.


[User] Please transcribe this text

[Assistant] So the maximum number of nodes in this tree that can happen is 2 raised to, what is the height? 2 plus 1 minus 1. So it is equal to 2 raised to 3 minus 1, which is equal to 8 minus 1, which is equal to 7.


[User] Please transcribe this text

[Assistant] Now if you calculate, this is also a perfect binary tree, which means it is completely filled with all the nodes. You can see we have seven nodes, which is exactly what we got over here. So just in case, just to clarify, if we had one more level or one more value added to the height,


[User] Please transcribe this text

[Assistant] How many number of nodes do we have? Let's apply this formula again. The height now would become 3 because we have 4 levels. And we have 2 raised to 3 plus 1 minus 1 which is equal to 2 raised to 4 minus 1 which is gonna be 16 minus 1 which is gonna be 15.


[User] Please transcribe this text

[Assistant] So let's calculate the number of nodes, maximum number of nodes in this binary tree. We already had 7, then we have 8, 9, 10, 11, 12, 13, 14 and 15. Okay?


[User] Please transcribe this text

[Assistant] So you can see this formula holds true. Please make a note of this formula, it can be asked


[User] Please transcribe this text

[Assistant] And you might be given the height or you might be given the number of levels or you might be just given a tree diagram and


[User] Please transcribe this text

[Assistant] You will be asked to calculate the maximum number of nodes that that particular tree can have, so this formula can


[User] Please transcribe this text

[Assistant] Easily get you that answer. Okay? Alright, let's move forward.


[User] Please transcribe this text

[Assistant] Okay so the last point I want to discuss briefly is the concept of dense versus sparse tree and the concept of balanced binary tree.


[User] Please transcribe this text

[Assistant] Let's try to understand what is dense versus a sparse tree. So a dense tree usually is where the distribution of nodes


[User] Please transcribe this text

[Assistant] It's fairly even on the left and the right hand side. So over here if you see the arrangement is in such a way that at level 0, you have 2 children, that is 2 and 3. And at level 1, the first node has 2 children. So when you add more nodes, it will be added over here as 6 and 7.


[User] Please transcribe this text

[Assistant] So a dense binary tree usually has a balance of both left and right child always.


[User] Please transcribe this text

[Assistant] And it does not prioritize assigning nodes in one particular direction in, in left or right. Okay. So compared to this diagram over here, you can see if this is the root.


[User] Please transcribe this text

[Assistant] You can see that this root node 1 has a left child. So this is level 0. Then this is level 1.


[User] Please transcribe this text

[Assistant] Again at level 1, node 2 has another left child. So this is level 2.


[User] Please transcribe this text

[Assistant] Now this kind of scenario is called a sparse tree scenario. We'll discuss more about these two different types in detail and also what is balance tree in detail. I just wanted to give you an introduction.


[User] Please transcribe this text

[Assistant] But now, if you want to traverse to node 6 in the dense tree, how many hops do you require? You will obviously start from the root.


[User] Please transcribe this text

[Assistant] The root is node 1, so you can see you'll go from 1 to 3 and you'll go from 3 to 6. So you require 2 hops. Similarly if you want to access node 5, you'll go from 1 to 2 and you'll go from 2 to 5. Again 2 hops. In the sparse tree,


[User] Please transcribe this text

[Assistant] Of course this is also a valid binary tree, but it is sparse in the sense that all the nodes are assigned in one direction.


[User] Please transcribe this text

[Assistant] 5, that is node 5, how many hops do you require? You go from 1 to 2, so this is 1, then you go from 2 to 3, it is 2nd hop, then you go from 3 to 4, it is 3rd, then you go from 4 to 5, it is 4th. So how many hops do you require?


[User] Please transcribe this text

[Assistant] You required 4 hops. So in a dense tree, node 5 was accessed in 2 hops.


[User] Please transcribe this text

[Assistant] In a sparse tree, node 5 was accessed in 4 hops. So you can see that the efficiency is more in a dense tree, which means that in less amount of time, we are accessing


[User] Please transcribe this text

[Assistant] So, if it took 1 second to make 1 hop, it would have taken 2 seconds in the dense tree to go from 1 to 5 and it would have taken 4 seconds which is double the time to access node 5 in the sparse tree.


[User] Please transcribe this text

[Assistant] Now, this was just an example. In real world scenarios, the binary trees are having multiple levels and that level value is large, so you have hundred and thousands of levels. And if in that case, if it is a sparse tree, the time required becomes exponentially high and we'll discuss the difference in


[User] Please transcribe this text

[Assistant] The time complexity also later on, but you get the idea, right? If I just add


[User] Please transcribe this text

[Assistant] Two more nodes over here. So five goes to six and six goes to seven. So two more levels are added. If I wanted to access node seven in the dense tree, I'm again gonna require only two hops. From one to three and three to seven. Again two hops, two seconds if it takes one second for one hop. But to access node seven in a sparse tree, I'm gonna require four plus five


[User] Please transcribe this text

[Assistant] Plus six, that is six hops, that is six seconds. So two seconds on the dense side.


[User] Please transcribe this text

[Assistant] But six seconds on the sparse side. So you can see the time is substantially increasing as the number of levels increase and that is the reason why we want to have minimum number of levels. So we try to convert a sparse tree into this dense kind of tree by rearranging the nodes in this format and try to balance it. So this is where the concept of balanced binary tree comes into picture and let's see what a balanced binary tree would look like.


[User] Please transcribe this text

[Assistant] So again, going through the definition, a binary tree is called balanced binary tree.


[User] Please transcribe this text

[Assistant] If difference between the height of the left and right subtree for every node is not more than k, which is usually 1. Okay, so let's take example 1.


[User] Please transcribe this text

[Assistant] So this is the root node. What we have to do, we have to calculate the height of left and right subtree.


[User] Please transcribe this text

[Assistant] So for node 1, this is the left subtree.


[User] Please transcribe this text

[Assistant] And this is the right subtree. What is the definition of height? The height of a node is defined as the longest path from that node to the leaf. So, the height of this subtree where for the subtree, this is the root node.


[User] Please transcribe this text

[Assistant] And then the height of the tree is gonna be the longest path from the top till the bottom. So you can go from 2 to 4 or 2 to 5. The height is gonna be 1 because we are requiring one hop. And when I say path,


[User] Please transcribe this text

[Assistant] It means this edge, we have to calculate the number of edges from the top till the bottom, which is the longest path. So for left subtree, the height is 1. So I'm going to write 1 over here. Let me use another color. Let me write 1 over here. For the right subtree, of course, this is also a tree.


[User] Please transcribe this text

[Assistant] And this is the root node. What is the height of this subtree? It is gonna be 0 because it does not have any child. So we don't have any edge to hop on. So I'll write 0 over here. So difference between the height of left and right subtree is 1 minus 0 which is equal to 1. Okay. Now, you also have to calculate the height for this and this as the left subtree and right subtree.


[User] Please transcribe this text

[Assistant] This is the left subtree, even though it does not have any further nodes, it is also considered as a subtree. Right? One single node in this format is also considered as a subtree.


[User] Please transcribe this text

[Assistant] So over here the height of this node is gonna be zero.


[User] Please transcribe this text

[Assistant] So this is considered as a balanced binary tree because the difference is not more than 1 for any subtree.