[User] Please transcribe this text

[Assistant] It has big ears, so big ears, right? Really big ears, like fans that you can wave. Oh, I'm so hot.


[User] Please transcribe this text

[Assistant] Let's move my ears. Ah, nice. Okay. It eats plants. It eats plants. What do you think it is? Okay, so those are our clues. It lives in Africa and southern Asia.


[User] Please transcribe this text

[Assistant] It has really long teeth. Only two. Not all of them. Only two. Okay. It has big ears. And it eats plants.


[User] Please transcribe this text

[Assistant] What do you think it is? I'll give you one more clue. It has a really long nose. You know it right? You know it. Okay.


[User] Please transcribe this text

[Assistant] This is where it lives in Africa, right? If it lives in Africa, it lives in a place like this. What is it? It is the elephant. Yes, you know because the long nose, right? Let's look at the elephant. Wow, it's really big. Very impressive. Wow.


[User] Please transcribe this text

[Assistant] Wow, really amazing, really big animal. Let's look at it.


[User] Please transcribe this text

[Assistant] We can see the big ears. Look at those ears, they're really huge.


[User] Please transcribe this text

[Assistant] Okay, they make the elephant look really big. And here are the tusks. The tusks actually go like this, right? They don't go down, they go out like this. And sometimes they can get really long.


[User] Please transcribe this text

[Assistant] Let's read more about the elephant. An elephant can grow up to 13 feet tall.


[User] Please transcribe this text

[Assistant] Thirteen feet tall. I am six feet tall. I'm six feet tall. So that's more than double.


[User] Please transcribe this text

[Assistant] My height. I have to look up. We all have to look up at the elephant. Hello elephant, Joe Chanel. Right? Okay.


[User] Please transcribe this text

[Assistant] It can grow up to 30 feet long. 30 feet? That's about 10 meters, right? It's about 10 meters.


[User] Please transcribe this text

[Assistant] It can weigh up to fifteen thousand pounds. Fifteen thousand pounds?


[User] Please transcribe this text

[Assistant] That's about kilograms. Kilograms. So that is as big as a truck in your town, in your city. Sometimes you see trucks, like a big truck driving around.


[User] Please transcribe this text

[Assistant] Wow, that's really big. So if you are near an elephant,


[User] Please transcribe this text

[Assistant] When you say hi, be careful. Joshim, hail. The elephant's really big. Watch out for his feet, right? Boom, boom. Oh, Joshim, hail. Be careful around an elephant. Okay, so that's an elephant.


[User] Please transcribe this text

[Assistant] Okay, what is the mightiest animal in the world? The mightiest, the biggest, the heaviest, the strongest animal in the world. It is the blue whale. Wow. Look at that. Look at the blue whale.


[User] Please transcribe this text

[Assistant] It's the longest, the heaviest, the biggest, the strongest mammal in the world.


[User] Please transcribe this text

[Assistant] It's bigger than the walrus. It's bigger than the rhino. It's bigger than the giraffe. It's bigger than the elephant. It's bigger than all of those animals. Where does it live? It lives in the ocean.


[User] Please transcribe this text

[Assistant] We don't live in the ocean, we don't worry about meeting the blue whale, but it would be cool, huh? If we are in the ocean, we see the blue whale, wow, that would be amazing.


[User] Please transcribe this text

[Assistant] But not every day, okay? So phew, it's in the ocean. It can weigh up to, oh, what is this number? Oh, 너무 힘들어, right?


[User] Please transcribe this text

[Assistant] When you see a number like this, think about where the comma is. You see the comma? Then don't worry about that part, the back part. Just worry about the part before the comma. And what is that number?


[User] Please transcribe this text

[Assistant] This number, just think about that number. That number is


[User] Please transcribe this text

[Assistant] Two hundred forty, right? Two hundred forty.


[User] Please transcribe this text

[Assistant] Okay, that's easy. Then the comma and three zeros, what does that mean? That means thousand.


[User] Please transcribe this text

[Assistant] Thousand. Chun, right? Thousand. Chun. So.


[User] Please transcribe this text

[Assistant] Thousand. Ah, that's much easier. So 240,000 pounds. What is 240,000 pounds?


[User] Please transcribe this text

[Assistant] I don't know, in kil- in kil- kilograms? That's about...


[User] Please transcribe this text

[Assistant] About Ship Iman kilograms, right? Ship Iman kilograms.


[User] Please transcribe this text

[Assistant] Yeah, ship Eman, uh, kilograms. That's a lot. See, now I have to go to Korean. Okay. So that's a lot. That's many, many cars. How many Musso cars, SUV cars is that? That's about, uhm, 48.


[User] Please transcribe this text

[Assistant] That's about 48 cars. Wow. That's a lot of cars, right? That's how much this whale weighs.


[User] Please transcribe this text

[Assistant] How long can it grow? It can grow up to 100 feet long. 100 feet long. How long is 100 feet?


[User] Please transcribe this text

[Assistant] Well, think about the bus. Do you ride the city bus? Of course, everybody does.


[User] Please transcribe this text

[Assistant] One hundred feet is longer than two buses. Longer. So here's one bus, right? That's one bus. That's the second bus. And we still have more left.


[User] Please transcribe this text

[Assistant] Can you imagine? Next time you are on the street, look at the street. You can see two buses next to each other. Think of the whale is longer than both those buses and you have some more left for the tail.


[User] Please transcribe this text

[Assistant] Wow, that's really, really long. So the blue whale is the biggest mammal in the world. Let's look at another picture. Wow, that's really amazing, isn't it?


[User] Please transcribe this text

[Assistant] There's a blue whale, looks like mama whale, and her baby whale.


[User] Please transcribe this text

[Assistant] That's really, really amazing. I wish I was a scuba diver. Skin, you say skin scuba?


[User] Please transcribe this text

[Assistant] Go scuba diving. Maybe you can see that. You can meet the mightiest mammal in the world. It's the blue whale.


[User] Please transcribe this text

[Assistant] Okay, in this book we talked about many different mammals, many different mighty mammals.


[User] Please transcribe this text

[Assistant] We talked about the walrus, we talked about the hippo, we talked about the giraffe, we talked about the rhino, we talked about the elephant, and we talked about the blue whale.


[User] Please transcribe this text

[Assistant] These are all mighty mammals. They're really big mammals that are in the world. How many will you see?


[User] Please transcribe this text

[Assistant] Maybe you'll go to the zoo. Maybe you'll go to Africa. Maybe you'll go to Southern Asia and see them.


[User] Please transcribe this text

[Assistant] In real life. Maybe? I hope so.


[User] Please transcribe this text

[Assistant] Okay, that finishes the end of our book. I hope you learned a lot. Okay, take it easy. We'll see you again next time. Bye bye.


[User] Please transcribe this text

[Assistant] I'm Ron, by the way. Ron Weasley. I'm Harry. Harry Potter.


[User] Please transcribe this text

[Assistant] I'm Ron, by the way. Ron Weasley. I'm Harry. Harry Potter.


[User] Please transcribe this text

[Assistant] Of course, my mission card! Alright, let's see what we got here. Dear Kevin.


[User] Please transcribe this text

[Assistant] Please get the following information from the Uber driver.


[User] Please transcribe this text

[Assistant] Where to find good food and where to visit in LA. Okay, I think we can do that. Come on.


[User] Please transcribe this text

[Assistant] Is it okay if, uh, well, can I roll up the window?


[User] Please transcribe this text

[Assistant] You consider it. At least tell the driver you're gonna throw up before you do it. Maybe they have a bag or you can stop the car.


[User] Please transcribe this text

[Assistant] Uh, this is my first time visiting LA and I really have no idea where to go. So you've been living here for years and I need some pro tips, man. So can you list off a few places that you think are essential for a visitor of LA to check out?


[User] Please transcribe this text

[Assistant] I'm not really that big a fan of shopping, but if, what, okay, well.


[User] Please transcribe this text

[Assistant] Quintessential Los Angeles. You hear that mentioned in songs and stuff.


[User] Please transcribe this text

[Assistant] As a tourist, what are some neighborhoods that you think that I should stick to? What are some safe places for a tourist like me?


[User] Please transcribe this text

[Assistant] What time does rush hour usually hit in Los Angeles?


[User] Please transcribe this text

[Assistant] Wish me luck. Ted's gonna get it on with a TV reporter. It's just in. Okay.


[User] Please transcribe this text

[Assistant] So, Ranjeet, you must have done it with a Lebanese girl.


[User] Please transcribe this text

[Assistant] So Marshall, this Olive Theory, based on you and Lily,


[User] Please transcribe this text

[Assistant] You hate olives. Lily loves them, you can't stand them. Yeah, hate olives. Two weeks ago, Spanish bar on 79th street, dish of olives, you had some. What up?


[User] Please transcribe this text

[Assistant] Why are we still sitting here? Let's go, we can still make last call. What do you say, Lil? Yo ho ho and a bottle of rum!


[User] Please transcribe this text

[Assistant] Hi kids! I'm Brian, and we are here as part of the Brain Bank reading series. Today, we're going to read a book called


[User] Please transcribe this text

[Assistant] Seeds. Seeds? What are seeds? In Korean, you say see or seeot. Isn't that interesting?


[User] Please transcribe this text

[Assistant] In Korean, hangukoro, you say see.


[User] Please transcribe this text

[Assistant] It's really similar. They're almost the same. Seeds see. Well, that's very interesting. Sometimes, sometimes,


[User] Please transcribe this text

[Assistant] You can find similar features of English and Korean, but sometimes, not always, I'm sorry.


[User] Please transcribe this text

[Assistant] Okay, but in this case, seeds and see.


[User] Please transcribe this text

[Assistant] Interesting. Let's learn about seeds. Okay? In our book, we have a table of contents. A table of contents. This tells us what topic is on which page. This is the page number.


[User] Please transcribe this text

[Assistant] This is the topic. So the first topic, seeds. What page? Page two.


[User] Please transcribe this text

[Assistant] Here, this topic, animals and seeds, right?


[User] Please transcribe this text

[Assistant] People and seeds, right? People and seeds? What page?


[User] Please transcribe this text

[Assistant] So we will talk about these different topics on these different pages. Let's begin with seeds. Here we see a lot of pictures and some text.


[User] Please transcribe this text

[Assistant] Look at this picture here first. What do you see? Do you know these types of flowers?


[User] Please transcribe this text

[Assistant] What kind of flowers are these? Do you know? These are sunflowers. Sunflowers. And this girl, what is she doing? What is this here? This is a pale.


[User] Please transcribe this text

[Assistant] What's inside the pail? It's mul, water. Why does she have a water pail?


[User] Please transcribe this text

[Assistant] Because she's watering.


[User] Please transcribe this text

[Assistant] The plants. She's helping them to grow. To be big.


[User] Please transcribe this text

[Assistant] Why do we want sunflowers to grow big? Why? Because we eat sunflower seeds. Ah, mashisoyo. And they are healthy. They are good for you.


[User] Please transcribe this text

[Assistant] So many people eat sunflower seeds. In fact,


[User] Please transcribe this text

[Assistant] If you go to McDonald's or Lotteria and you have a hamburger,


[User] Please transcribe this text

[Assistant] On the bread, pang eso. On the top, you can see little seeds. Those are sesame seeds. Some bread. Not all bread, but some bread.


[User] Please transcribe this text

[Assistant] And pumpkin seeds. Hobak. Hobakshi. Right? Hobak seeds. I like pumpkin seeds. They're good. Okay? They're tasty. So these are kinds of seeds that are good to eat. Let's read together.


[User] Please transcribe this text

[Assistant] A seed is part of a plant's life cycle. Remember, a life cycle is a cycle or circle that shows the time when different things happen.


[User] Please transcribe this text

[Assistant] An animal or a plant is born.


[User] Please transcribe this text

[Assistant] It grows. It gets bigger. It becomes an adult.


[User] Please transcribe this text

[Assistant] It has seeds or babies of its own and the cycle starts again.


[User] Please transcribe this text

[Assistant] That's a life cycle. The seed is part of the life cycle. The seed is the beginning of the life cycle. The beginning. Just like this is the beginning of this book. Okay?


[User] Please transcribe this text

[Assistant] Seeds come from plants. They come from plants.


[User] Please transcribe this text

[Assistant] When they have water and warmth,


[User] Please transcribe this text

[Assistant] They can grow into new plants. So seeds need two things. One thing is water.


[User] Please transcribe this text

[Assistant] The second thing is warmth.


[User] Please transcribe this text

[Assistant] Warmth? Where do seeds get warmth? They get it from the sun.


[User] Please transcribe this text

[Assistant] The sun will shine and warm the plants and the plants take the sunlight.


[User] Please transcribe this text

[Assistant] And they can grow bigger. They need water and they need warmth. Those are two of the things that plants need. They need other things, but those are the two main things.


[User] Please transcribe this text

[Assistant] So, we have the seed. What is it doing here? This shows part of the life cycle of a plant. Here is a seed. What happens to the seed?


[User] Please transcribe this text

[Assistant] It goes and it grows into a small little plant here, a baby plant. We'll talk about that later. And here it becomes an adult plant. Okay?


[User] Please transcribe this text

[Assistant] If we make that picture larger we see the sunflower seeds.


[User] Please transcribe this text

[Assistant] It grows into the baby plant, which we call a seedling. Seedling. So a seedling is like a baby plant. It's just starting to grow. Where is the seed? The seed is under the ground.


[User] Please transcribe this text

[Assistant] Then it becomes a plant with flower. It's an adult plant. An adult plant, and it has a flower.


[User] Please transcribe this text

[Assistant] Where are the seeds? The seeds are inside the flower and it starts again. This is the life cycle of


[User] Please transcribe this text

[Assistant] Let's talk about wind and seeds. When we think about seeds, they need water, they need warmth, but they also need space. They need to travel. How do seeds go to another place to make a new plant? How do they do that? Well,


[User] Please transcribe this text

[Assistant] On a flower, a type of plant.


[User] Please transcribe this text

[Assistant] And you see these little things here? These are seeds. We'll talk about those very soon.


[User] Please transcribe this text

[Assistant] Let's read. Seeds get to new places in many ways. So there are many ways that seeds go and travel to make new plants.


[User] Please transcribe this text

[Assistant] Sometimes the wind blows them. So we have the wind and the wind blows the seeds to different places. Okay?


[User] Please transcribe this text

[Assistant] Some seeds have little parachutes to help them float.


[User] Please transcribe this text

[Assistant] Okay, if I jump from a plane, I'm in an airplane, be hangy day, and I go jump, waaah.


[User] Please transcribe this text

[Assistant] Am I crazy? No! I have a parachute. I pull a string and...


[User] Please transcribe this text

[Assistant] A big piece of cloth stops me. That's a parachute. And I can fly through the air with my parachute.


[User] Please transcribe this text

[Assistant] Some seeds have wings. We'll see a picture of that, okay? So that's, uh, uh, two ways, or one way that seeds will travel.


[User] Please transcribe this text

[Assistant] Did you know that nearly all nuts are seeds? Do you like peanuts? Do you like walnuts? Do you like pecans? Those are all seeds. Walnuts, hazelnuts, macadamia nuts. Especially with chocolate.


[User] Please transcribe this text

[Assistant] Okay, chocolate macadamia nuts are good, but these are all seeds. That's another way that seeds travel. We'll talk about that later. But let's talk about parachutes and wings.


[User] Please transcribe this text

[Assistant] Here we see the same picture, the boy


[User] Please transcribe this text

[Assistant] He's blowing on a plant. What kind of plant? What's the name?


[User] Please transcribe this text

[Assistant] The name is dandelion. Do you know dandelions? When you go out in the spring and you can see the dandelion, you can pick it and


[User] Please transcribe this text

[Assistant] Below the dandelion, all the little seeds fly away.


[User] Please transcribe this text

[Assistant] These are like parachutes. They catch the wind and they can fly. It's like having a parachute. And the parachute carries the seeds far away. And they will grow into new dandelions somewhere else.


[User] Please transcribe this text

[Assistant] Now some seeds have wings. Wow, it's really chemisoyal. It's like a butterfly or a bat, right? So seeds also have wings. Did you know that?


[User] Please transcribe this text

[Assistant] I didn't know that. That's very interesting. So wind helps the seeds to go to different places. And that's how seeds can travel and make new plants in new places.


[User] Please transcribe this text

[Assistant] Okay, well that brings us to the end of part one. What will we discover about plants in part two? I hope you join me in part two and we'll learn more about seeds. See you then!


[User] Please transcribe this text

[Assistant] Hi kids, how are you? I'm Brian, and we are on


[User] Please transcribe this text

[Assistant] We learned about how seeds travel.


[User] Please transcribe this text

[Assistant] How seeds move from one place to another. We learn that wind blows the seeds, some seeds, to different places. Some seeds have parachutes, some seeds have wings.


[User] Please transcribe this text

[Assistant] Well that's one way that seeds travel. What's another way?


[User] Please transcribe this text

[Assistant] Another way is by birds. Birds and seeds. What do we see here? We see a bird eating some fruit. What's inside the fruit? There are seeds.


[User] Please transcribe this text

[Assistant] Inside the fruit, the berry. Here is another bird and it's eating the seeds. What will happen to the


[User] Please transcribe this text

[Assistant] Fruit and the seeds. The birds will eat them. Right?


[User] Please transcribe this text

[Assistant] And then the birds will fly somewhere else. And they'll go...


[User] Please transcribe this text

[Assistant] To the bathroom, dung hell. And that's how the seeds travel. The seeds will be in the dung, okay? Let's read. Many birds eat seeds. They eat fruit, too.


[User] Please transcribe this text

[Assistant] This bird is eating seeds. This bird is eating fruit.


[User] Please transcribe this text

[Assistant] Often, the seeds are inside the fruit.


[User] Please transcribe this text

[Assistant] The seeds come out with the birds droppings, right? They go to the bathroom. But birds don't use hua zheng shil, they just go anywhere. Sometimes on your shoulder or your head.


[User] Please transcribe this text

[Assistant] Some of the seeds inside the dung grow into new plants. That's interesting. That's how some seeds travel to other places. They're in the fruit or the birds eat the seeds directly. Did you know?


[User] Please transcribe this text

[Assistant] About this, what is this here? This looks like chocolate. Chocolate bar. Do you know where chocolate comes from?


[User] Please transcribe this text

[Assistant] The seed of a cacao tree is called a bean. Okay, a bean and that's where chocolate comes from.


[User] Please transcribe this text

[Assistant] People use the beans to make chocolate. So a cacao tree, probably in South America


[User] Please transcribe this text

[Assistant] Chocolate has beans that grow on it. Do you like beans? Some people like beans. Some people don't like beans. But chocolate is made from a bean that grows on a cacao tree. But if you take the bean, does it taste like chocolate?


[User] Please transcribe this text

[Assistant] No, it's bleh. It's very bitter. So you have to put a lot of sugar in chocolate. So be careful. Don't eat a lot of chocolate. It has a lot of sugar. Okay.


[User] Please transcribe this text

[Assistant] Let's see here. The birds, this is another picture here. The birds carry seeds to new places. Okay, he's carrying the seeds and the fruit.


[User] Please transcribe this text

[Assistant] And this is a bird eating sunflower seeds. So here again, we have the two pictures of the birds eating the seeds. They will fly to another place.


[User] Please transcribe this text

[Assistant] This, by the way, is the cacao tree beans. These are the beans, and this is the cocoa powder, cocoa powder, that people will make to make chocolate or hot choco. Don't say hot choco, say hot chocolate.


[User] Please transcribe this text

[Assistant] Chocolate, mmmm, right? Especially in the winter. Let's continue.


[User] Please transcribe this text

[Assistant] Now we heard about birds and seeds. Are birds the only animals that spread seeds by eating them and then later dropping them? No.


[User] Please transcribe this text

[Assistant] Animals also will eat seeds. What do we see here? This is a squirrel. And what is the squirrel doing? The squirrel has a nut.


[User] Please transcribe this text

[Assistant] Do you remember the squirrel who puts the nuts in its cheeks and gets really big cheeks and then runs home and


[User] Please transcribe this text

[Assistant] Animals other than birds, animals other than birds, eat seeds too. Birds aren't the only animals, other animals eat seeds too.


[User] Please transcribe this text

[Assistant] They also carry seeds to new places. Some seeds have little hooks, a hook, like a fish hook. Did you know that?


[User] Please transcribe this text

[Assistant] The hooks stick to the animal's fur.


[User] Please transcribe this text

[Assistant] Ooh, that's very interesting. The hook will catch onto the fur of the animal and it will stick.


[User] Please transcribe this text

[Assistant] Later, the seeds fall to the ground and grow in another place.


[User] Please transcribe this text

[Assistant] In the forest, or in a field.


[User] Please transcribe this text

[Assistant] When you finish, look at your socks. Your socks might have little round things stuck to your socks or to your pants. Those are seeds. And those seeds have little hooks on them that catch onto your clothes.


[User] Please transcribe this text

[Assistant] Can we use that? Is that something that maybe we could use for our lives?


[User] Please transcribe this text

[Assistant] Did you know in 1948, a long time ago,


[User] Please transcribe this text

[Assistant] A man saw some seeds stuck to his dog's fur.


[User] Please transcribe this text

[Assistant] So he found some seeds on his dog.


[User] Please transcribe this text

[Assistant] He took a close look. Oh, very close look. He looked at them very, very closely. The seeds had tiny hooks. He had an idea. Bing! I have an idea.


[User] Please transcribe this text

[Assistant] He made tape with little hooks. So he got some tape and he put hooks on the tape.


[User] Please transcribe this text

[Assistant] Then he made another piece of tape, but this tape has loops. Okay? A loop is like this. So the tape has loops, and the other tape has hooks. Hook. Hook. Now,


[User] Please transcribe this text

[Assistant] What will happen if you stick the two tapes together? What do you think will happen? Well, the hooks, the two pieces stuck together. The hooks catch onto the loops. The hooks will catch onto the loops. The two pieces stuck together.


[User] Please transcribe this text

[Assistant] Do you know what his invention is called? You maybe use it every day. His invention is called Velcro.


[User] Please transcribe this text

[Assistant] You know Velcro, you have it on, some people have it on their tennis shoes, right? Your tennis shoes, it makes a sound.


[User] Please transcribe this text

[Assistant] When you open it up and you close it and it sticks again. You open it up.


[User] Please transcribe this text

[Assistant] And you close it again. You use it on your tennis shoes, on your backpack.


[User] Please transcribe this text

[Assistant] On the, uh, on your coat to close the front of your coat or to make the sleeves on your coat tight. We use Velcro a lot, especially in clothing, but also in backpacks and other things.


[User] Please transcribe this text

[Assistant] So Velcro is very useful. That's interesting.


[User] Please transcribe this text

[Assistant] This man got the idea from nature. Look around!


[User] Please transcribe this text

[Assistant] Maybe you will get an idea like this from nature.


[User] Please transcribe this text

[Assistant] The squirrel has a nut, maybe it's an acorn.


[User] Please transcribe this text

[Assistant] Acorns are the seeds of oak trees.


[User] Please transcribe this text

[Assistant] Squirrels eat acorns. They store acorns in new places too. So squirrels eat the acorns. They also carry the acorns to new places.


[User] Please transcribe this text

[Assistant] Before we talked about the seeds with hooks, look at this. That's very interesting. Of course, this seed is very big. Now, usually seeds are very small.


[User] Please transcribe this text

[Assistant] That looks dangerous. Musuwao, right? But don't worry.


[User] Please transcribe this text

[Assistant] These seeds are really very small, but they have hooks. They look very sharp, right? Joe Shimeo.


[User] Please transcribe this text

[Assistant] But they're so small, they don't hurt you. They just stick to your clothes and to your dog.


[User] Please transcribe this text

[Assistant] Animals carry seeds. Birds carry seeds. Squirrels carry seeds. Dogs and animals with fur.


[User] Please transcribe this text

[Assistant] Let's look here. We can see this is the ocean. What kind of seed is this? Do you know what this is? That's a coconut. And inside the coconut is a seed.


[User] Please transcribe this text

[Assistant] Some seeds travel to new places in water.


[User] Please transcribe this text

[Assistant] Rivers carry seeds, oceans carry seeds. This is a river or ocean? It's an ocean, right? And it can carry seeds.


[User] Please transcribe this text

[Assistant] When the seeds reach land, when they come to land, the new plants


[User] Please transcribe this text

[Assistant] Begin to grow. They start to grow as new plants.


[User] Please transcribe this text

[Assistant] Did you know? What is this here? This is a type of uh, coco de men.


[User] Please transcribe this text

[Assistant] The nut of the coco de men palm tree is the biggest seed in the world.


[User] Please transcribe this text

[Assistant] It can weigh up to 50 pounds. 50 pounds? That's like 20 kilograms, a ship kilogram. Oh, that's really heavy. And that's the seed, only the seed.


[User] Please transcribe this text

[Assistant] Normally, seeds are very small, but the seed of the coco de men palm tree is the biggest seed in the world. It's very heavy. Wow. Okay.


[User] Please transcribe this text

[Assistant] Let's look some more here. We saw this before. Coconuts are seeds. They can float for hundreds of miles, many, many kilometers, hundreds of kilometers. Coconuts can float in the ocean. Here we can see a coconut floating for a long time. It


[User] Please transcribe this text

[Assistant] Reach the land, and now what's happening? What's this here?


[User] Please transcribe this text

[Assistant] It's growing a new coconut tree, a new palm tree. Palm tree is grown from


[User] Please transcribe this text

[Assistant] Coconuts. So a new palm tree will grow right here from the coconut. That's interesting. Also, mangrove. Mangrove seeds float in water. This is a mangrove tree. When they reach shore, they grow into mangrove trees. Mangrove trees grow in the ocean


[User] Please transcribe this text

[Assistant] Birds will eat them and go to another place and make droppings. Animals will carry seeds to other places and water carries seeds to different places too.


[User] Please transcribe this text

[Assistant] So we've reached the end of part two. Let's find out some more about seeds in part three. I'll see you in part three. Goodbye for now.


[User] Please transcribe this text

[Assistant] Hi kids! Welcome back to part three of Seeds. Remember seeds? See in Korean. Seeds. Seeds grow into new plants. Now in part one and part two,


[User] Please transcribe this text

[Assistant] We talked about how seeds travel.


[User] Please transcribe this text

[Assistant] Seeds actually travel to different places. In part one, we learned that seeds travel with the wind. Right? In part two, we learned that seeds travel with birds, animals, and water.


[User] Please transcribe this text

[Assistant] But what about people? Do people...


[User] Please transcribe this text

[Assistant] Travel with seeds? Do people move seeds from one place to another? Sure they do. Let's take a look here. What are these people doing? There's a bunch of children here. And what are they doing? What is this here?


[User] Please transcribe this text

[Assistant] They have a tool for digging in the ground.


[User] Please transcribe this text

[Assistant] And they have something in their hands they're dropping into the ground.


[User] Please transcribe this text

[Assistant] Those things are seeds. So people also move seeds. Let's read together.


[User] Please transcribe this text

[Assistant] People spread seeds too.


[User] Please transcribe this text

[Assistant] They eat fruit and throw away the seeds. Do you like apples? Of course you like apples. Sometimes you have a whole apple and you eat it. Crunch, crunch, crunch. When you're finished, you have the middle of the apple. What do you do with it?


[User] Please transcribe this text

[Assistant] Well, you could throw it in a trash basket, or if you're in nature, you can just throw it in the trees. It's okay. It's not really


[User] Please transcribe this text

[Assistant] Trash or like stregy that you have to throw away in a special place. The apple's no problem. Throw it away. The seeds inside the middle


[User] Please transcribe this text

[Assistant] Might grow into a new tree. So people eat fruit and throw away the seeds.


[User] Please transcribe this text

[Assistant] They plant seeds in their gardens. Another way. Do you have a garden? Maybe not. It's a little hard to have a garden here. We need a lot of land. But some people do have gardens and they plant seeds in those gardens.


[User] Please transcribe this text

[Assistant] They go to new places and take seeds with them. So if I move from one city to another city, maybe I'll take the seeds from my garden and plant a new garden in the new city. So they take their seeds with them. Did you know?


[User] Please transcribe this text

[Assistant] A lot of kids, sometimes kids don't like peas. Okay? When I was a kid, I didn't like peas. Uuuh. Especially cooked peas.


[User] Please transcribe this text

[Assistant] But fresh peas, that's okay. They're okay.


[User] Please transcribe this text

[Assistant] They are seeds. They grow in a pod. A pod. P-O-D. This is a pod of seeds.


[User] Please transcribe this text

[Assistant] You can open it and you see many peas inside.


[User] Please transcribe this text

[Assistant] Right? You can eat them up. Okay? They're good for you. They are seeds.


[User] Please transcribe this text

[Assistant] Here are the children planting seeds and we can see different seeds in fruit. Before, I talked about the apple.


[User] Please transcribe this text

[Assistant] In the middle of the apple are the seeds. Do you eat that?


[User] Please transcribe this text

[Assistant] No, don't eat it. Bleh. It's very hard and it's not, doesn't taste good.


[User] Please transcribe this text

[Assistant] Throw it away. Maybe new apples will grow. Apple tree will grow. Do you like Subak? Subak is great, especially in the summertime. We like Subak. It's very delicious. Watermelon. Watermelon has seeds in them. Do you eat the seeds? Many people go,


[User] Please transcribe this text

[Assistant] They spit the seeds out. If you, if you spit the seed on the dirt,


[User] Please transcribe this text

[Assistant] Maybe it will grow there later on. So people will eat the watermelon and they'll go,


[User] Please transcribe this text

[Assistant] They spit the seeds. Some people eat the seeds.


[User] Please transcribe this text

[Assistant] Okay, that's a different way too. And kiwi, are there seeds in the kiwi? Do you see them? Yea, they're the black.


[User] Please transcribe this text

[Assistant] The little black dots, spots here, here, here, here. There's many seeds in the kiwi. Do you eat the kiwi seeds?


[User] Please transcribe this text

[Assistant] Yes, we eat the kiwi seeds. Do you remember the birds? The birds eat the seeds, they go somewhere else, and they dung hail, they go to the bathroom? Well,


[User] Please transcribe this text

[Assistant] Same thing with people. A long, long time ago, before we had toilets,


[User] Please transcribe this text

[Assistant] People would eat fruit and then when it's time to go to the bathroom, they go away in the woods, go to the bathroom and leave.


[User] Please transcribe this text

[Assistant] That is good for the seeds because the dung is very good.


[User] Please transcribe this text

[Assistant] To grow. It gives the seeds food to grow. So,


[User] Please transcribe this text

[Assistant] Think about that next time you eat fruit, but don't think too much, okay? It's okay. Okay. Let's move on.


[User] Please transcribe this text

[Assistant] Do you know this person? Do you know this man? Did you hear about him before? He's a famous person in American history. A famous person in American history. His name is Johnny Appleseed. More than 200 years ago, long time ago,


[User] Please transcribe this text

[Assistant] There lived a man named John Chapman. His real name, Chincha Idom, Chincha Idom, is John Chapman.


[User] Please transcribe this text

[Assistant] He walked everywhere. He liked to walk. Oh, I like to see new places. And he walked many places. He walked everywhere.


[User] Please transcribe this text

[Assistant] And he planted apple seeds. When he walked to a new place, he would plant apple seeds on his trip.


[User] Please transcribe this text

[Assistant] Children called him Johnny Appleseed. Johnny Appleseed is not his real name. John Chapman is his real name. But Johnny Appleseed is his nickname. Nickname.


[User] Please transcribe this text

[Assistant] Okay, so he has a nickname, Johnny Appleseed.


[User] Please transcribe this text

[Assistant] Johnny was a little strange. Because he never wore shoes. He's walking just in his feet.


[User] Please transcribe this text

[Assistant] And that's, you know, that's okay. Two hundred years ago, not everybody had shoes.


[User] Please transcribe this text

[Assistant] But also Johnny did something 조금 더 이상해요. He wore a pot for a hat. Huh?


[User] Please transcribe this text

[Assistant] Your mother cooks with a pot, right? She puts water and something inside on the stove. She cooks it. Well, Johnny Appleseed used the pot for his hat. So yeaah, he was 조금 이상해요. Anyway.


[User] Please transcribe this text

[Assistant] He walked a lot. He, many people saw him.


[User] Please transcribe this text

[Assistant] They thought he's a little strange but he planted apple trees in many places. Where did he go? This is a map of America?


[User] Please transcribe this text

[Assistant] These are the states. States where Johnny planted apple seed. State.


[User] Please transcribe this text

[Assistant] It's like Gyeonggi-do, uh, Cheongwon-do, or uh, Gyeonggi, uh, Gyeongboknam, uh, I'm sorry, I can't remember all the states in Korea, uh, but they're different states or provinces. Many states in America, for example, uh,


[User] Please transcribe this text

[Assistant] Kentucky, Illinois, Indiana, Ohio, Pennsylvania.


[User] Please transcribe this text

[Assistant] Two hundred years ago, most people lived here, uh, most Europeans lived here in America. And Johnny Appleseed traveled a lot. This is a lot for two hundred years ago. And everywhere he went, he planted apple seeds. And he made many apple trees.


[User] Please transcribe this text

[Assistant] This is Johnny Appleseed. What does he, do you see the pot? The pot is here. The pot is on his head. No shoes. He's, he doesn't have any shoes.


[User] Please transcribe this text

[Assistant] And what is this? He has a tool for farming. It's called a rake.


[User] Please transcribe this text

[Assistant] And he's planting apple trees. These are apple trees in the background. So Johnny shared with other people everything he had.


[User] Please transcribe this text

[Assistant] He was very generous. He gave things that he had to other people. If he has a lot of food, he will give some to other people. He shares. That's good.


[User] Please transcribe this text

[Assistant] Thanks to Johnny's apple seeds, the Midwest is now full of apple trees. The Midwest? The Midwest are the middle states.


[User] Please transcribe this text

[Assistant] Uh, Kentucky, Ohio, Indiana. There are the middle states between the East Coast and the West Coast of America. Okay? Uh, so the Midwest has many apple trees. Thank you, Johnny Appleseed. Thanks to him. Thanks to Johnny's Appleseeds, there are many apple trees.


[User] Please transcribe this text

[Assistant] In the Midwest. That's very good.


[User] Please transcribe this text

[Assistant] Okay, do you wanna do something fun? Do you wanna do a good activity?


[User] Please transcribe this text

[Assistant] You can grow your name using seeds.


[User] Please transcribe this text

[Assistant] You will need mung bean seeds. Mung bean seeds. Ask your mom to help you get some mung bean seeds. You'll need a dish. You'll need some cotton.


[User] Please transcribe this text

[Assistant] And you'll need some water. So what are the steps? Let's see. Number one, first.


[User] Please transcribe this text

[Assistant] Line the dish with cotton. So take the cotton, like the cotton pads, you can go to a Yakook and get some cotton, and put the cotton on the bottom of the dish, all around the dish. Put the cotton there. That's step one. Step two, sprinkle water. Sprinkle means


[User] Please transcribe this text

[Assistant] You know, just a little drops here and there. Take the water and sprinkle water on the cotton in the dish.


[User] Please transcribe this text

[Assistant] Write your name with mung bean seeds. In other words


[User] Please transcribe this text

[Assistant] Put the seeds in a line to make your name. And of course, you can use English letters or Hangul.


[User] Please transcribe this text

[Assistant] It doesn't matter, right? So you can write your name with mung bean seeds. Just make the shape of the letters for your name in English or in Korean. Great. Step four.


[User] Please transcribe this text

[Assistant] Put the dish in a warm place. Keep the dish in a warm place. So it has, it's warm. Not too cold, but nice and warm. Keep the cotton damp.


[User] Please transcribe this text

[Assistant] Damp means keep putting some water, sprinkle some water on the cotton. Make sure there's some water so the seeds can grow.


[User] Please transcribe this text

[Assistant] Finally, watch what happens. What do you think will happen?


[User] Please transcribe this text

[Assistant] Well what will happen is little seedlings will start to grow and they will be in the shape of your name.


[User] Please transcribe this text

[Assistant] That sounds like fun. Let's do that. If you have a chance, if you have time, why don't you give it a try?


[User] Please transcribe this text

[Assistant] Alright, let's do that. Okay, well that brings us to the end of chapter three, or part three of seeds. We learned a lot about seeds, how they grow,


[User] Please transcribe this text

[Assistant] How they are spread and we also learned a fun activity that we can make plants grow in the shape of our names.


[User] Please transcribe this text

[Assistant] Okay, I hope you had fun. I sure did. I'll see you next time. Take care.


[User] Please transcribe this text

[Assistant] Yo, what's going on guys? Thanmai 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 gonna understand


[User] Please transcribe this text

[Assistant] The implementation of a queue data structure using a singly linked list data structure.


[User] Please transcribe this text

[Assistant] So this is the part one wherein we discuss the overall working of a queue data structure using a single linked list data structure. So this is queue using linked list and not queue using array.


[User] Please transcribe this text

[Assistant] And in this tutorial, we're gonna see all the different functions of a queue data structure that is queue operations like enqueue, dequeue, display, count, etc.


[User] Please transcribe this text

[Assistant] But internally we are gonna use a singly linked list and not a simple array. Okay?


[User] Please transcribe this text

[Assistant] So we're gonna see the pseudo code, we're gonna understand the working step by step, taking diagrammatic representation of the queue of the computer memory.


[User] Please transcribe this text

[Assistant] And we're gonna cover each and every topic in detail. So make sure you watch this video till the end. And before we start off, I'm assuming you guys already know what is a queue data structure. If not, we've already covered queue using array and the general


[User] Please transcribe this text

[Assistant] Data structure queue and the different operations how it works that is first in first out and all those basic topics in previous tutorials where we understood the queue data structure in detail.


[User] Please transcribe this text

[Assistant] For those who are here to understand Q data structure using linked list, this video is just for you. So make sure again to watch this video till the end. And 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.


[User] Please transcribe this text

[Assistant] Okay, so as you can see on the screen, in the center we have queue using array.


[User] Please transcribe this text

[Assistant] Over here we have an array of size 4, we have some elements and we are using this array as a queue data structure. Okay, so we are implementing queue data structure using array and the visual representation of this queue can be shown over here. So in a queue data structure, we have two open ends. So the data is pushed into the queue from one end from the rear end and it is dequeued from the front end. So from where it is pushed, it is known as enqueue.


[User] Please transcribe this text

[Assistant] And from where it is removed out, it is called DQ. So unlike stack,


[User] Please transcribe this text

[Assistant] A queue data structure operates in first in first out manner. So in stack, this is how the stack would look like. We have only one entry and exit point.


[User] Please transcribe this text

[Assistant] So that's why a stack operates in first in last out that is filo or last in first out.


[User] Please transcribe this text

[Assistant] But in a queue data structure, the operation happens first in first out, which means the first element that goes in


[User] Please transcribe this text

[Assistant] So that is how queue and stack differ from each other in terms of the mode in which they operate.


[User] Please transcribe this text

[Assistant] Now the same data structure, queue data structure can be visualized in the computer memory as follows. This is the array arr and we know that array arr


[User] Please transcribe this text

[Assistant] Is declared and defined in the computer memory in the contiguous memory locations. When I say contiguous it means right besides each other.


[User] Please transcribe this text

[Assistant] So if hash 300 is the address which is starting point of the array, that is the first element of the array 45, the next address over here is hash 302 because I'm considering two bytes for integer elements and this is just for representation purpose. These addresses are fictitious that they are not real.


[User] Please transcribe this text

[Assistant] They're just imaginary, but you can see the addresses are right next to each other. So in array declaration,


[User] Please transcribe this text

[Assistant] All the elements in the array are always right next to each other that is at contiguous memory locations. So, this is how this array would look like in the computer memory. Okay.


[User] Please transcribe this text

[Assistant] Now when we implement queue as an array, this array is made to work like a queue. That is whenever you input some value in the array, it would be inputted from the rear end.


[User] Please transcribe this text

[Assistant] So we've seen the basic queue standard functions that is enqueue, dequeue, count in the queue data structure tutorial where we use the array. So whenever one element is removed, the front is incremented.


[User] Please transcribe this text

[Assistant] 66, so the rear will now point to 66. Whenever we remove an element from the cube,


[User] Please transcribe this text

[Assistant] Let's say 45 is removed, the front will now move forward to 6. Okay? And of course the basic linear queue has some issues.


[User] Please transcribe this text

[Assistant] So that's why we also saw the different type of queue that is the circular queue.


[User] Please transcribe this text

[Assistant] Which is also covered in this DSA course. You can check that out. But anyways, now let's move on to queue using linked list because we already know how queue using array works. So now let's go ahead and see how queue can be implemented using a singly linked list.


[User] Please transcribe this text

[Assistant] Okay, so on the right hand side we have Q using singly linked list. Now I'm assuming you already know what is a linked list, what is singly linked list, what is doubly linked list. All these topics are separately covered in these tutorials as well in this course of DSA. Do check that out if you're confused because we've talked about them in detail.


[User] Please transcribe this text

[Assistant] But now, in this diagram you can see we have a queue.


[User] Please transcribe this text

[Assistant] But inside the queue, we do not have array elements. You do not have simple array elements. You have nodes. Okay? So in linked list,


[User] Please transcribe this text

[Assistant] The elements that are stored are called as nodes. Now the node will have a key, its value and a pointer which points to the next node in the linked list.


[User] Please transcribe this text

[Assistant] Now since it is a singly linked list, we only have one pointer. If it was a doubly linked list, we would have a previous pointer as well.


[User] Please transcribe this text

[Assistant] But we are using single English because it serves a purpose in this tutorial and that is what is depicted in this queue. Okay, so orange value is the key.


[User] Please transcribe this text

[Assistant] Key is the unique identifier of a node, okay. So for example, if our queue has 10 nodes, every node will have a unique key. You cannot have same key value nodes.


[User] Please transcribe this text

[Assistant] Technically you can have them, but our implementation restricts that kind of scenario. Okay. So that's why we have a key. Then we have a value which is the actual value or data to be stored. This value can also be termed as data.


[User] Please transcribe this text

[Assistant] Okay, so things in blue are the value.


[User] Please transcribe this text

[Assistant] And the next is basically a pointer. So when we actually write a C++ program in the next tutorial, we will create a class node.


[User] Please transcribe this text

[Assistant] Which will have a pointer next, which will also be of type node because it will be pointing to node objects only. So this next pointer will point to the next node. So over here you can see this is the first node. Let's call it n1. Okay, n1, n1 has a key of 1.


[User] Please transcribe this text

[Assistant] It has value of 45 and it is created in the address in the computer memory at address location hash 100 and the next pointer has the next address.


[User] Please transcribe this text

[Assistant] So that's the whole point of implementing a Q data structure using single linked list. So essentially we have single linked list as a data structure.


[User] Please transcribe this text

[Assistant] So we will have a front pointer which will point to the first node. So this is the front end and we will have a rear pointer which will point to the last node. It is called a rear end. So whenever a new node will be added, it will be added over here. Okay.


[User] Please transcribe this text

[Assistant] Then this rear will be incremented to point to that node. This linking will also be made. Let's say this is done at the address of hash 106. Let's say the key is 4. The value is 3.


[User] Please transcribe this text

[Assistant] And since this node is at the rear end, the address in the next would be null. And now this address of the last


[User] Please transcribe this text

[Assistant] Similarly, when we remove an element from the queue, that is when we do the dequeue operation,


[User] Please transcribe this text

[Assistant] To point to the next node. And then this will be removed from the queue by using the delete keyword when we implement it in C++. You'll understand that coding side when we move to that. But just understand that when we increment the front pointer to point to the next node, essentially we are delinking this node and we're moving forward, right?


[User] Please transcribe this text

[Assistant] So this diagram of a queue using nodes that is using singly linked list can be visualized in the computer memory as follows. You can see over here. The individual four nodes, N1, N2,


[User] Please transcribe this text

[Assistant] Now since these nodes are gonna be objects in C++ or any other programming language that you create, those are not array elements. So array elements are created side by side. So Q using array, you can see the elements are all side by side.


[User] Please transcribe this text

[Assistant] But when you create node objects in the computer memory, they will be created at any random location.


[User] Please transcribe this text

[Assistant] And n2 are created side by side, but n3 and n4 are created at random locations.


[User] Please transcribe this text

[Assistant] So right now these nodes are at random locations, but the linking has to happen. So you can see the addresses in the next pointers are the way in which the linking has happened. So that's why it is a singly linked list.


[User] Please transcribe this text

[Assistant] So these purple arrows are the way in which they are linked to each other. So n1 is pointing to n2, n2 is pointing to n3 and n3 is pointing to n4. Now this is a singly linked list, but we want to make it work like a queue.


[User] Please transcribe this text

[Assistant] And that is where the implementation comes into picture. That is where we have to write some code. That is where we have to have some pseudo code of individual queue functions. That is enqueue, dequeue, count, display and the standard functions to make this single English work like a


[User] Please transcribe this text

[Assistant] Okay, so I hope you understood the diagrammatic representation and the difference between queue using array and queue using singly linked list and how they both work and the obvious question is what is the advantage of queue using singly linked list over queue using array.


[User] Please transcribe this text

[Assistant] So in queue using array what happens is once you declare the size of the array,


[User] Please transcribe this text

[Assistant] You cannot change this size because array size has to be declared at compile time. So of course you cannot add more elements than the size of the array. So you'll have to keep removing the elements from the queue and add new elements.


[User] Please transcribe this text

[Assistant] But the size of the array, the size of the overall queue will always be 4, right? So this is the biggest advantage because in queue using singly linked list you can have n number of node objects and you just have to make the linking. So I can create many more nodes and just make the linking.


[User] Please transcribe this text

[Assistant] And I can keep on removing and adding nodes into the singly linked list and make it work like a queue.


[User] Please transcribe this text

[Assistant] So the size is dynamic. You can also reduce it and also increase it at runtime depending upon your requirements.


[User] Please transcribe this text

[Assistant] As long as you have the computer memory, you can create many nodes and link them in the singly linked list way, but make it work like a queue.


[User] Please transcribe this text

[Assistant] So that's the biggest advantage. It also has some disadvantages of the traversal of the extra memory which is created to store the address. The node objects will take more memory compared to these basic integer variables.


[User] Please transcribe this text

[Assistant] Inside the array and so on and so forth. But whenever the requirement is such that you require dynamic memory in a queue data structure, a queue using singling list is always and obviously preferred over queue using simple arrays. Okay.


[User] Please transcribe this text

[Assistant] Okay, so now that you've understood the difference, the advantage and the diagrammatic representation of what happens in the computer memory and the queue data structure, let's discuss the individual queue operations, the standard queue operations like enqueue, dequeue, count, display and so on and so forth and try to


[User] Please transcribe this text

[Assistant] Okay, so as you can see on the left hand side, we have the node class, because node is the element that we are gonna store in our queue in the singly linked list way. But we have to create this node, right? Because when we implement queue using singly linked list, that is when we write a program, we will have to create a node class


[User] Please transcribe this text

[Assistant] Key which is going to be the unique identifier. It will have the value that is the actual data. So this value can also be called as data.


[User] Please transcribe this text

[Assistant] And the next would be the next pointer which points to the next node. That's the node class.


[User] Please transcribe this text

[Assistant] Now the node class will also have member functions. So this is objects and classes concepts. I hope you know the object oriented programming concepts in C++ because we're going to use C++ to implement


[User] Please transcribe this text

[Assistant] Nothing but two constructors, the default constructor. So when you create node without


[User] Please transcribe this text

[Assistant] Key and value, we are keeping the data type as int for simplicity purpose.


[User] Please transcribe this text

[Assistant] Of course, the key and value can have different data types also. For example, key can be character also. Key can be string also, but it has to be unique.


[User] Please transcribe this text

[Assistant] The value can be also any data type. It can be float. It can be double. It can also be other class which you have created any other user defined class also. But as I mentioned for simplicity purpose, we are keeping the data type as int and int. The pointer next will have


[User] Please transcribe this text

[Assistant] Node class itself, so it would be a node pointer which will point to node objects only. That's why the class has to be node. So node star is pointer. So this is something which is related to C++ syntax. I hope you know the pointers concept as well because in the next tutorial we're going to use that extensively.


[User] Please transcribe this text

[Assistant] The data members in class queue would be node star front and node star rear. So we will need two pointers which keeps a track of the front of the node and the rear of the node. So in this diagram, let me draw the two pointers. Let's denote front by F and R by rear. So front will point to the front end and rear will point to the rear end. Right now our queue is empty.


[User] Please transcribe this text

[Assistant] But of course, as we move ahead, once we start to take a look at these individual member functions,


[User] Please transcribe this text

[Assistant] We will add some nodes and we will enqueue and dequeue nodes. But anyways, there are only two data members in the queue class and both of them are pointers of type node because in our queue we will have node objects only.


[User] Please transcribe this text

[Assistant] Moving on to the member functions, the standard queue class or standard queue data structure member functions are is empty.


[User] Please transcribe this text

[Assistant] IsEmpty is nothing but a function which checks if q is empty. Then we have the enq method.


[User] Please transcribe this text

[Assistant] By the way, method and functions are one and the same thing. Whenever there is a function inside a class, it is addressed as method. Okay, so don't confuse between the two. So NQ stands for adding a new node from the rear end.


[User] Please transcribe this text

[Assistant] So whenever we do an enqueue, we will add a new node from the rear end.


[User] Please transcribe this text

[Assistant] Lastly, we have the count which as the name suggests gets the number of nodes in the queue at any given time.


[User] Please transcribe this text

[Assistant] And two more standard functions which is checkifNodeExist. So this is extra utility function which checks if a particular node exists into the queue by checking its unique key.


[User] Please transcribe this text

[Assistant] So let's say if we have three nodes into our queue, and,


[User] Please transcribe this text

[Assistant] Node N1 has the key of 1, node N2 has 2 and node N3 has 3. Let's say we want to add node N4 and N4 also has the key of 3. In that case, before we enqueue that node into the queue, we will have to check if this key matches any of the


[User] Please transcribe this text

[Assistant] According to our implementation, according to our rule that we are setting, every node should have unique key, right?


[User] Please transcribe this text

[Assistant] So this is something that we are setting in our case, okay. It is not necessary that we need to have unique keys, but generally that is what is assumed and that's what we are going to implement.


[User] Please transcribe this text

[Assistant] So that's why this utility extra function and lastly we have void display which as the name suggests prints all the node in the queue. Okay.


[User] Please transcribe this text

[Assistant] Now what we'll do is we'll one by one take a look at these individual member functions or


[User] Please transcribe this text

[Assistant] We will have a main function inside which we will create the queue, inside which we will create the nodes and we will do all the queue operations, right? So that is something that we are doing over here. We are trying to visualize that scenario over here. In the main function, you can see first line, we say queue and queue. We create an object of queue. So queue is a class that we just saw and this queue is basically the object.


[User] Please transcribe this text

[Assistant] Then, at second line we create node n1, n2, n3 and n4. And we create


[User] Please transcribe this text

[Assistant] With the values of 45, 6, 77 and 54 respectively. Okay? So by these two steps what happens is, in the computer memory, a Q object is created. Let's create that. So this is Q. Okay?


[User] Please transcribe this text

[Assistant] Let's say it, it is created at the address location hash 104.


[User] Please transcribe this text

[Assistant] Now inside the queue object remember in the queue class we had two data members. Those were the two pointers front and rear.


[User] Please transcribe this text

[Assistant] So obviously initially when you create a queue object, both of those pointers will have null in its address. So let's write that also in the computer memory. Okay. So at step number one, we create a queue object queue. The front and rear obviously initially will be null and null.


[User] Please transcribe this text

[Assistant] The second line, we create four different nodes at four different locations, which will be randomly created at any different locations in the computer memory. So let's create that. Okay, so as you can see on the screen.


[User] Please transcribe this text

[Assistant] As of now, you can see n1, n2, n3 and n4, all of them have null in their next pointer because in the parameterized constructor of the node class, let me just show it to you. This is that parameterized constructor. We were passing key and data, that is key and value. So this value is nothing but data only. So key and data is assigned as k and d, but


[User] Please transcribe this text

[Assistant] The next pointer is not assigned anything which means it will be null. We can specifically make it null as well. So, imagine one more line over here next equals to null.


[User] Please transcribe this text

[Assistant] And so far we've just executed the first two lines of the main function. Now after this, the very first Q operation, we say Q dot is empty. So Q is an object of class Q.


[User] Please transcribe this text

[Assistant] I should have named it something else because q and q sound same. But anyways, initially when we create the q object, the front, let's name


[User] Please transcribe this text

[Assistant] Or let's address front as f. I'll write f over here and r as rear, rear over here. Both of them are pointing to null and null. So f is having null and rear is also having null, right? So the is empty function.


[User] Please transcribe this text

[Assistant] Or is empty operation in the queue data structure in the queue class.


[User] Please transcribe this text

[Assistant] When both front and rear will be pointing to null, in that case we can safely assume that we have nothing inside the queue.


[User] Please transcribe this text

[Assistant] So right now, if you observe the diagram also, in the queue we don't have anything.


[User] Please transcribe this text

[Assistant] In the computer memory, we have created four nodes, but we have not linked them together. We've created the Q object, but inside the object, both the front and rear pointers are having null.


[User] Please transcribe this text

[Assistant] So we can safely say that is empty is true, which means that our queue is empty. So this will return true. Okay, so I hope the pseudocode is


[User] Please transcribe this text

[Assistant] Easy to understand, it is pretty much looking like a code, but it is not. It is part code, part English. It has if-else.


[User] Please transcribe this text

[Assistant] If front equal equal to null and rear equal equal to null, both the conditions are true. In that case, our queue is empty. Else, it is not. That is the basic logic for is empty function, is empty operation.


[User] Please transcribe this text

[Assistant] Pretty basic, let's move forward now. Let's see the enqueue operation.


[User] Please transcribe this text

[Assistant] Okay, so we are at q dot nq n1. So now we want to add one node inside our q data structure. So what is the logic behind nq?


[User] Please transcribe this text

[Assistant] The pseudo code has certain steps, numbered steps.


[User] Please transcribe this text

[Assistant] So we have three major sections or three major if else if and else conditions inside the enqueue. So three conditions. Number one is if it is empty that is if the queue is empty we have certain steps. Number two is for when we add a new node or when you enqueue a new node inside the queue we have to first check if that particular node


[User] Please transcribe this text

[Assistant] Already exist in the queue. When I say already exist, it means that you have to check for the matching key.


[User] Please transcribe this text

[Assistant] So if there are already 3 nodes N1, N2 and N3 with their unique keys 1, 2 and 3 respectively, and if you are adding one more node N4,


[User] Please transcribe this text

[Assistant] For that, we have step number two, which checks if node exists. This check if node exists is another operation which we will come to in a minute. But in that case, we have to print node already exists, use different key. Okay, so the first condition is if


[User] Please transcribe this text

[Assistant] And when no node exists with the unique key that we want to insert, so in that case we have to simply enqueue that node.


[User] Please transcribe this text

[Assistant] So right now, if you observe the first condition is true, that is if is empty is true right now. So we are only interested in step number one.


[User] Please transcribe this text

[Assistant] At least for the first enqueue operation. We have one more enqueue. In fact, multiple enqueue operations later on will come to that. But for the first time we want to enqueue n1, so this n is basically n1.


[User] Please transcribe this text

[Assistant] In the computer memory, what is n1? n1 is 1, 45. And the next pointer is having none. Okay?


[User] Please transcribe this text

[Assistant] So when it is empty, what we do, step number 1.1 says front equals to N, rear equals to N.


[User] Please transcribe this text

[Assistant] Now front which is represented by F and rear which is represented by R are both pointers.


[User] Please transcribe this text

[Assistant] What is the address of n1 in the computer memory? You can see it is 100, that is hash 100. So now, f will have hash 100. Let's use another color. f will have hash 100 and r will also have hash 100 and the first node will be enqueued.


[User] Please transcribe this text

[Assistant] So after turn number 1.1 and 1.2, we simply print node enqueue.


[User] Please transcribe this text

[Assistant] What we essentially did is, in the computer memory also, we will change this null


[User] Please transcribe this text

[Assistant] And add hash 100 and hash 100 in the memory also. So now, this front will point to N1. This rear will also point to N1. Okay? Which is hash 100, which is the first node. So in the queue you can imagine that the node is enqueued. So let's add the node over here. Okay, so the first node is added into the queue from the rear end. Basically it is added from the rear end and pushed


[User] Please transcribe this text

[Assistant] Now this is a unique scenario because we have only one element that is one node in the queue. So that's why front and rear will be pointing to the same node, right?


[User] Please transcribe this text

[Assistant] And then front and rear will be pointing to two different nodes. So you'll understand that in a minute. But this is the first enqueue operation.


[User] Please transcribe this text

[Assistant] Where the if condition was true, that is if empty was true, that's why front and rear started pointing to n1.


[User] Please transcribe this text

[Assistant] Both of them have hash 100 hash 100, so in the computer memory also you can see. Both of them are pointing to n1. And now, n1.


[User] Please transcribe this text

[Assistant] Which is having the key of 1 and value of 45, that is data of 45. And the next pointer as null as of now is now enqueued into the queue. Okay, so this is n1.


[User] Please transcribe this text

[Assistant] Okay, so now let's actually see the second enqueue operation. So in the main function you can see we say queued out enqueue n2. Now we want to enqueue the next node into the queue. We've already enqueued the first node n1. So both front and rear are pointing to that as of now. And now we want to enqueue one more node.


[User] Please transcribe this text

[Assistant] So coming inside the enqueue, the first thing is we check if the queue is empty.


[User] Please transcribe this text

[Assistant] So is empty, we've already seen checks if the front and rear are pointing to null.


[User] Please transcribe this text

[Assistant] Which means the address stored in the front and rear pointer is null. So as of now you can see the front and rear has the address of hash 100 which is the address of n1. So of course front and rear is not null.


[User] Please transcribe this text

[Assistant] Which means that the queue is not empty. So this entire step number 1, 1.1, 1.2 and 1.3 will not be executed. We will move forward in the lsif part. In the lsif part we will check if the node exists.


[User] Please transcribe this text

[Assistant] And we basically have to pass n2 over here because we want to check if


[User] Please transcribe this text

[Assistant] This N2 that we want to enqueue, it has the key of 3. So we have to check if there exists any node inside the queue with the same key.


[User] Please transcribe this text

[Assistant] And n2 has a key of 3, so obviously n2 will not be there in the entire queue, which means that this key will not match. So of course again, this second


[User] Please transcribe this text

[Assistant] condition will also be not true, so we will completely skip this and move on to the last part where we simply have to add this n2, that is enqueue this n2 inside the queue.


[User] Please transcribe this text

[Assistant] So there are three steps. The first step we say is rear of next equals to n.


[User] Please transcribe this text

[Assistant] Okay, so what does this mean? So 3.1 says rear of next equals to n.


[User] Please transcribe this text

[Assistant] So right now you can observe that rear is pointing to N1. So rear has the address of 100. So we use this rear pointer.


[User] Please transcribe this text

[Assistant] To access n1, and when we access the n1 object,


[User] Please transcribe this text

[Assistant] We say rear of next. So rear of next is basically n1 of next. What is n1 of next? That is what is the value of next pointer inside n1? It is currently null. So we have to change this. And we have to change it to n. n right now is basically nothing but n2. Because you want to enqueue n2, right?


[User] Please transcribe this text

[Assistant] So n2's address, so n2's address is now stored in the next pointer of n1. So n1 currently has null.


[User] Please transcribe this text

[Assistant] So what we'll do in the memory, we will erase this null and we will store n2's address.


[User] Please transcribe this text

[Assistant] In the computer memory, where is N2 created? N2 is created as hash 102. So let's write hash 102 over here. And in the queue also we will make this change. So we will erase this null, which is the next pointer of N1. We will make it hash 102. Okay.


[User] Please transcribe this text

[Assistant] So now n1 points to n2 because n1's next is pointing to n2. So let's make that linking. So I'll make a linking over here. Right. So you can see n1 now points to n2 after step number 3.1. Alright.


[User] Please transcribe this text

[Assistant] Let's see what is 3.2. In 3.2, now what we say is rear equals to n, which is n2. Okay, so n is currently n2. So right now rear is pointing to n1. The address stored in rear pointer is of n1.


[User] Please transcribe this text

[Assistant] But now we are changing it to N2's address. What is N2's address? N2 is created in the computer memory at hash 102. So now, rear, the address of rear will change to hash 102. So we'll say hash 102.


[User] Please transcribe this text

[Assistant] So now rear is not gonna point to N1, it is going to point to N2. And we simply say, that is we simply print node NQ. So in the computer memory also, the rear, the address will change to hash 102. So rear pointer that was pointing to N1, we'll erase that also. Now rear will point to N2.


[User] Please transcribe this text

[Assistant] And that's how we enqueue one more node. So let's add one more node into the queue.


[User] Please transcribe this text

[Assistant] Okay, so n2 is now enqueued, you can see we printed enqueued, so n1.


[User] Please transcribe this text

[Assistant] Of n1, we have hash 102, hash 102 is the address of n2. So you can see this is the linking that is happening, right?


[User] Please transcribe this text

[Assistant] So you can see the singly linked list linking is also there and we are using this linked list like a queue because now the rear pointer is pointing to N2.


[User] Please transcribe this text

[Assistant] The front is obviously pointing still to n1 which is at the start of the queue, but now the end of the queue is n2.


[User] Please transcribe this text

[Assistant] So I hope you've understood the enqueue operation right now. We've done two enqueue operations and now let's move forward and do one more enqueue and add n3 in the same way. So n3 is


[User] Please transcribe this text

[Assistant] Going to be enqueued inside the queue. What is N3? N3 is, according to our code, we have 7 comma 77.


[User] Please transcribe this text

[Assistant] So we'll go a little fast now because we've got a hang of it.


[User] Please transcribe this text

[Assistant] Of course, the first condition will not be true. Is empty? Is our queue empty? No, it is not. So entire step number one will be skipped. Check if node exists.


[User] Please transcribe this text

[Assistant] Any node exists with Q of 7 inside the queue? No. We have key as 1, we have key as 3.


[User] Please transcribe this text

[Assistant] Step number three says rear of next equals to n.


[User] Please transcribe this text

[Assistant] So we will change it to N3 because node N is the new N3 node that we are trying to enqueue.


[User] Please transcribe this text

[Assistant] What is N3's address? N3's address is hash 300. So let's make that change over here. Let's make hash 300 inside the


[User] Please transcribe this text

[Assistant] N2 is next also, we have to make that change in the computer memory. We will say hash 300.


[User] Please transcribe this text

[Assistant] So n2 will start pointing to n3. So let's make that linking n2 will point to n3. Okay. So the first linking is done.


[User] Please transcribe this text

[Assistant] Which is N3 right now. So, rear was currently pointing to N2 with the address of hash 102, but now rear will start pointing to N3, which is hash 300. So, let's make that change over here in the rear pointer. We will say hash 300. The rear pointer will stop pointing to N2 and it will have hash 300.


[User] Please transcribe this text

[Assistant] And lastly we will say node enqueued. So let's add n3 over here inside the queue. So this is n3 and the linking is also done because n2


[User] Please transcribe this text

[Assistant] Is pointing to N3. You can see the next pointer in N2 is hash 300. Hash 300 is the address of N3. So this linking is done. And we can say node enqueued.


[User] Please transcribe this text

[Assistant] So in the computer memory also N1 is pointing to N2, N2 is pointing to N3. The front is still pointing to N1, but the rear will now point to N2, so let's make that change. Rear will point to N3. Okay, so we've done three NQ operations, so I hope the NQ operation is clear to you. We will do more NQs later on to understand the other parts, other conditions of the NQ.


[User] Please transcribe this text

[Assistant] But now let's move ahead in the main function and we will go to count. So we can say q.count.


[User] Please transcribe this text

[Assistant] Now visually obviously we can see that there are 3 nodes inside the queue, so the count has to be 3.


[User] Please transcribe this text

[Assistant] But let's see what is the pseudo code for the count and how we can get this count programmatically and step by step. So the count function is pretty basic. Step number one is to create a count variable as zero. So let's write count over here. Count equals to right now zero.


[User] Please transcribe this text

[Assistant] Next is we create a temporary pointer, node pointer which will store the address from the front pointer. Okay. So, temp equals to


[User] Please transcribe this text

[Assistant] What is the address inside the front pointer right now? From the memory you can see it is hash 100, hash 100 which is pointing to n1. So hash 100 is stored in the temp pointer.


[User] Please transcribe this text

[Assistant] And at the same time increment this count because it is a singly linked list, right? We have to traverse from one node to another node till we reach the address of null. So, if you observe in n3,


[User] Please transcribe this text

[Assistant] The next of n3 is null. So if we traverse from n1 to n2 to n3 and we move forward, ultimately we will reach null.


[User] Please transcribe this text

[Assistant] So that is what is happening at step number 3. We are using a while loop. We say while temp not equal to null. That is till this temp node or temp pointer has some address.


[User] Please transcribe this text

[Assistant] The first condition we are checking while temp not equal to null.


[User] Please transcribe this text

[Assistant] Which means that temp is not null. So we will go inside the while loop. At step number 3.1, we will say count++. So this count will become 1. At step number 3.2, we will say temp is equal to temp of next.


[User] Please transcribe this text

[Assistant] So 102 will now be stored 102, that is hash 102 will now be stored inside temp. So hash 100 will now change to 102. Hash 102.


[User] Please transcribe this text

[Assistant] Okay, so again we will come at the start of the while loop, we will check while temp not null.


[User] Please transcribe this text

[Assistant] Now obviously temp is not null, temp has a new address of hash 102, which is address of n2. So temp is pointing to n2 now.


[User] Please transcribe this text

[Assistant] So again we will go inside the loop, count will become plus plus, count will become 2.


[User] Please transcribe this text

[Assistant] And then again at 3.2, we will say temp equals to temp of next. So temp is currently pointing to n2.


[User] Please transcribe this text

[Assistant] What is the next pointer inside N2? It is hash 300 which is address of N3. So hash 300 now will be stored inside temp. So temp will have hash 300. Again we will go at the start.


[User] Please transcribe this text

[Assistant] We will check while temp not null, of course temp is not null because temp has the address of n3 which is


[User] Please transcribe this text

[Assistant] Which is a valid address, so it is not null. So we'll go inside 3.1, we will say count++. Count will become 3. And now we will say again temp is equal to temp of next. So temp is currently pointing to n3.


[User] Please transcribe this text

[Assistant] What is the next pointer inside n3? It is null. So now, null will be assigned to temp. So now, temp will become null.


[User] Please transcribe this text

[Assistant] So now when we go to the start of the while loop, we will check while temp not equal to null. But this time temp is equal to null.


[User] Please transcribe this text

[Assistant] So this while loop will run only till temp is not equal to null. So once temp becomes null, we will exit outside this while loop. And we will go to step number 4, we will say return count. What is the count? Count is 3.


[User] Please transcribe this text

[Assistant] And this is the entire pseudocode, entire logic of the count operation.


[User] Please transcribe this text

[Assistant] So 3 will be returned from this and we will get the output as 3 over here. Okay. So I hope the count function was easy to understand. It was pretty basic. Let's move forward.


[User] Please transcribe this text

[Assistant] Now moving forward we have the first dequeue operation. So let's see the pseudo code for dequeue. Dequeue is removing of node from the front side. Okay? Okay. So let's go step by step to understand dequeue.


[User] Please transcribe this text

[Assistant] The very first step is we create a temporary pointer of type node and assign null to it. So let's write temp equals to null as of now. Initially temp is null. We're gonna use this later on, so let's move forward. Step number two is we have to check if


[User] Please transcribe this text

[Assistant] The queue is empty. Now if the queue is empty you cannot


[User] Please transcribe this text

[Assistant] Observing right now our current scenario, our queue is not empty. We have three nodes inside the queue. So this step number 2 and 2.1 will be not executed, will not, we will skip this. We will move to the third else. Now in the else part, we have two conditions for two different scenarios. The first scenario, 3.1,


[User] Please transcribe this text

[Assistant] And when that happens, remember the front and rear will be equal, which means that front and rear will be pointing to the same node. So in that scenario, we have some extra things to do and we will see that when that condition becomes true.


[User] Please transcribe this text

[Assistant] But right now, front and rear are not equal because front is pointing to n1 which has the address of hash 100.


[User] Please transcribe this text

[Assistant] Rear is pointing to hash 300, which is n3. So of course 3.1 will not be executed. We will move to 3.2.


[User] Please transcribe this text

[Assistant] Now in 3.2 what we have to do, we have to dequeue N1 because new nodes are added from the rear end and existing nodes are removed from the front end.


[User] Please transcribe this text

[Assistant] Remember we created a temp node at the start and assigned null to it. Now we will store the address of front. Front is currently pointing to n1 which is hash 100. So hash 100 will be stored inside temp.


[User] Please transcribe this text

[Assistant] After this at 3.2.2 we will say front equals to front of next. So, front is currently pointing to n1. What is the next pointer?


[User] Please transcribe this text

[Assistant] Inside N1, it is storing N2's address, which is hash 102. So this 102 will now be stored inside the front pointer. So now front will start pointing N2. So the address inside front will also change. It will change to hash 102. In the memory also, hash 100 will change. It will change to hash 102.


[User] Please transcribe this text

[Assistant] So front will now start pointing to N2. N2 as the address of hash 102. And lastly, we will say return temp.


[User] Please transcribe this text

[Assistant] So temp is still pointing to n1, right? Temp is the address of 100.


[User] Please transcribe this text

[Assistant] This pointer will be returned from dq into the main function. So, we can simply access the value of n1.


[User] Please transcribe this text

[Assistant] And NQ basically adds one element from the rear end. Let's do the DQ one more time. So your second DQ operation is called. In the first DQ, we removed N1. So from the computer memory also, this linking is broken and consider this entire element to be erased.


[User] Please transcribe this text

[Assistant] Then we move forward, we check if empty, of course the queue is not empty, so 2 and 2.1 will be skipped.


[User] Please transcribe this text

[Assistant] In the third else part, the first 3.1 is a condition if front and rear are equal. Which means that we have only one element inside the queue. But right now front is pointing to N2. Rear is pointing to N3. So front and rear are not equal. So entirely 3.1 will be skipped. We will move to 3.2. In 3.2, we will say temp equals to front. So temp initially add null, but now temp will store hash 102.


[User] Please transcribe this text

[Assistant] Because front is 102, so hash 102. Then we will say front equals to front of next. Front is pointing to N2 right now. N2 is next as 300. That is hash 300 which is the address of N3.


[User] Please transcribe this text

[Assistant] In the memory also, front value has changed to hash 300.


[User] Please transcribe this text

[Assistant] So front will also start pointing to N3.


[User] Please transcribe this text

[Assistant] So front and rear are pointing to the same object, same node right now. And lastly, we will say return temp.


[User] Please transcribe this text

[Assistant] Temp was pointing to N2 because temp has the address of 102. So, 102 address.


[User] Please transcribe this text

[Assistant] You know, print the values of n2, which is dequeued value of key of 3 and value of 6 and simply delete that node over here. So that we will do in the main function. I have not written the code for that because that we will see in the implementation side. But once you delete that, this entire node will be erased off from the memory. So this linking will also be erased and from the computer memory also n2 will be erased. So n2 is completely gone. Now we only have n3 inside the queue.


[User] Please transcribe this text

[Assistant] Count and we've already seen the count pseudocode. This time the count will be 1 because we only have 1 element inside the queue.


[User] Please transcribe this text

[Assistant] We have one more enqueue operation of n4. But before this enqueue, let's assume that we have one more dequeue. Let's do the one more dequeue.


[User] Please transcribe this text

[Assistant] So let's do this extra dequeue again and now again we will do the dequeue. We will create a node temp which will store initially null.


[User] Please transcribe this text

[Assistant] Then in step number two, we will check is empty. It is not empty. We have one element inside RQ or one node inside RQ, N3. Now in the else part, this time if you see 3.1 will become true. In 3.1, we are checking if front equal equal to rear.


[User] Please transcribe this text

[Assistant] This time front and rear are pointing to the same node because we only have one node inside the cube.


[User] Please transcribe this text

[Assistant] So obviously both front and rear will be pointing to that same node. The address is hash 300, hash 300. So this time we have to do some extra things. First, obviously we will say temp equals to front.


[User] Please transcribe this text

[Assistant] Or you can also say temp equal to here because both of them have the same address. So temp will now store hash 300.


[User] Please transcribe this text

[Assistant] Obviously the front and rear pointers should have null because that is the initial state, right? So front and rear will become null. So in the computer memory also, both these addresses have to become null. So whatever they are pointing that also has to be erased. So initially they were pointing to N3, but now both of them are made null. So they're not pointing to any object.


[User] Please transcribe this text

[Assistant] And lastly, we will say return temp. Temp was hash 300, which is n3. So that will be returned over here.


[User] Please transcribe this text

[Assistant] And we can print out the n3's values which is 7 and 77. So that will be printed at this deque operation.


[User] Please transcribe this text

[Assistant] That can be printed in the main function and we can write the code separately and we can delete the node also. So we will erase this from the queue and that will also be erased from the memory. Okay, so now you can see we have pretty much emptied the entire queue. We've deleted all the extra nodes.


[User] Please transcribe this text

[Assistant] So now I hope you've understood the entire dequeue operation with both the different scenarios of 3.1 and 3.2. That's the reason why we did a extra dequeue. Now let's move on to the enqueue operation, enqueue n4.


[User] Please transcribe this text

[Assistant] We've already seen the pseudo code for enqueue, but let me just show it to you over here once again.


[User] Please transcribe this text

[Assistant] In NQ, the first condition will be true, that is, is empty. If it is empty, front and rear will be pointing to N. And in this case is N4 that we are trying to NQ over here. N4 is 2 and 54.


[User] Please transcribe this text

[Assistant] So the front will point to N4. What is N4's address? N4's address is hash 204. So both front.


[User] Please transcribe this text

[Assistant] The front and rear pointer will start pointing to hash 204, hash 204. So both front and rear are pointing to the same node.


[User] Please transcribe this text

[Assistant] So 1.1 and 1.2 is done and we will simply say node enqueued. So we can add the node inside the queue.


[User] Please transcribe this text

[Assistant] So that's the node added, N4, this is N4. Both front and rear are pointing to the same node. Then we have a count, which will obviously be 1, because we have 1 node inside the queue.


[User] Please transcribe this text

[Assistant] Now the display function is pretty basic. First we will check if the queue is empty. So first condition is for that. If it is empty, obviously we will print the queue is empty.


[User] Please transcribe this text

[Assistant] So on the screen, on the command prompt, when we write the code, we will say print all values. We will create a node temp, which will store the address of the front. Right now it is hash 204.


[User] Please transcribe this text

[Assistant] And then we will use a simple while loop. We will say while temp not null. Print temp key and temp data.


[User] Please transcribe this text

[Assistant] That is step number 2.3.1 and at 2.3.2 we will say temp equals to temp of next. So initially temp will be pointing to n4. What is the key and data? We will print 2, 54. Then we will say temp equals to temp of next. So temp is currently pointing to n4. What is the next pointer inside n4? It is null. So then null will be stored inside temp.


[User] Please transcribe this text

[Assistant] And when we go at the start of the while loop we will check while temp not null, but temp has become null so we will exit outside this loop. So in case if we had more nodes inside this queue, we would have kept


[User] Please transcribe this text

[Assistant] So one last function that is left is check if node exists.


[User] Please transcribe this text

[Assistant] So as the name suggests, this node takes a node. Let's say we have one more node, nphi.


[User] Please transcribe this text

[Assistant] And right now you can see in the queue we have N4 which has the key of 2, right? So let's say we want to push one more node N5 with the same key as 2.


[User] Please transcribe this text

[Assistant] So this is something that we want to enqueue, right? So when we want to enqueue n-phi,


[User] Please transcribe this text

[Assistant] We will first have to check if there exists any node with the same key value of n-phi. Right? So that is what this function is all about.


[User] Please transcribe this text

[Assistant] So inside the checkif node exists, we want to enqueue nphi, which is 2,10. So the key is 2. So we will create a temp node for again iterating the entire queue. So this methodology is used to iterate the queue.


[User] Please transcribe this text

[Assistant] We will store the address of the front pointer. The front is pointing hash 204, which is the address of N4. Now we will again use the while loop.


[User] Please transcribe this text

[Assistant] While temp not null to iterate through the entire queue. Obviously right now we only have single value.


[User] Please transcribe this text

[Assistant] But inside this loop, what we are checking is, we will check if temp of key, so temp is currently pointing to n4. So temp of key which is n4's key is 2.


[User] Please transcribe this text

[Assistant] Is equal equal to n of k. So n is this new node n5 which we want to enqueue.


[User] Please transcribe this text

[Assistant] So in that case, we will say exist equals to true. So at step number two, I miss this step. We create a boolean variable exist. We assign false to it initially.


[User] Please transcribe this text

[Assistant] But we make it true when we have a match of keys.


[User] Please transcribe this text

[Assistant] And we will break out of this loop completely over here once a match is found.


[User] Please transcribe this text

[Assistant] So in case if there is a match, so in case if there is a node which is having the same key as n-phi,


[User] Please transcribe this text

[Assistant] This exist will become true, right? Because we will go inside the if condition. And we will return exist as true. But let's say we have three values inside the cube.


[User] Please transcribe this text

[Assistant] But there would never be a situation where temp of key will match n of key.


[User] Please transcribe this text

[Assistant] So this exist will never become true. The exist will remain false as we create it at the very start. And then we will return this false.


[User] Please transcribe this text

[Assistant] So this is how the checkifNodeExist function will work and this pretty much concludes all the different standard queue operations when we're using


[User] Please transcribe this text

[Assistant] Singly linked list as a queue, okay. So when we are implementing queue using singly linked list.


[User] Please transcribe this text

[Assistant] Okay, so I'm gonna conclude this tutorial over here. I know it was a lengthy one, but all the different standard operations had to be covered extensively with the help of pseudocode as well as the diagrammatic representation for the best understanding. And I hope you've got a very clear idea.


[User] Please transcribe this text

[Assistant] About how you can implement a queue using singly linked list and implement all the standard operations.


[User] Please transcribe this text

[Assistant] And we also saw the pseudo code of these standard operations and dry run those step by step by taking the visual diagram as well as the computer memory diagram to understand at every step what is happening for the best clarity and best understanding.


[User] Please transcribe this text

[Assistant] So I hope you like this video and if you've watched this video so far,


[User] Please transcribe this text

[Assistant] In the next video tutorial, we will write a C++ program that is we will see the practical side of implementing queue using singly linked list and we are gonna need all the pseudo code of all these standard operations and we will convert them into C++ code. So that will be interesting as well. So stay tuned for that and thanks for watching. See you in the next one. Peace.


[User] Please transcribe this text

[Assistant] She's not just one of them, she's the one. Yeah, well, the one is heading up to the roof.


[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 yes, we are continuing with our binary search tree data structure topic and we're moving on to the implementation and the practical side. Now, before we continue, in case you've missed the previous tutorial,


[User] Please transcribe this text

[Assistant] In the previous tutorial of this course of this playlist, we discussed what is a binary search tree, how is it different from a regular binary tree, and how is it better from


[User] Please transcribe this text

[Assistant] So that video was a complete theoretical as well as a diagrammatic representation. So in case you missed that, in case you don't know what is a binary search tree, please watch that video first because this is kind of like the part two of that topic.


[User] Please transcribe this text

[Assistant] So along with theory, we also want the practical knowledge. So that is what we're going to cover in this tutorial and


[User] Please transcribe this text

[Assistant] For this tutorial specifically, we're gonna get started with writing the C++ code.


[User] Please transcribe this text

[Assistant] And lastly, I'm going to divide this entire practical aspect into multiple parts depending upon the different operations like insertion, searching, deletion.


[User] Please transcribe this text

[Assistant] Take a diagrammatic representation and we also want to write the code so that becomes hectic. But anyways, without further spending more time, let's start off with today's topic.


[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.


[User] Please transcribe this text

[Assistant] Alright, so on the left hand side you can see a basic diagram of a binary search tree which is implemented as a dynamic nodes in the memory. So what do I mean by dynamic nodes?


[User] Please transcribe this text

[Assistant] Now in case if you watched the tutorial of binary tree, we discussed that there are two ways in which you can implement binary tree data structure. One is using this dynamic node strategy and one is using array.