 So one of the styles that we can look at if we're starting to deal with an array is something we like to call a Stack so we all kind of understand an array. It's pretty much just a list of numbers You know in some kind of order To work off of now if I had to go through this list just like we've already started to discuss I'd have to run off of a Biggo of in again. I have to go through every single element now the idea behind a stack One of the ways I like to think about a stack because I like to think in food is Let's imagine. I've got a terrible looking plate and on that plate. I happen to have a bunch of pancakes alright well if we looked at that kind of Stack of pancakes if you will One of the things we would say is how do I want to go about eating this? Now if I was a heathen if I was just a man a heathen I'd say let me just cut through every single one of these and Take out a big old chunk of it now. I'm not a heathen I would never do such a thing because you know if I'm trying to enjoy my pancakes I don't want to get rid of them that quickly and so as a result what I would start to do is I'd start to say well, let's just worry about that top piece for a second and Let me just start to work off of that one Eventually as you can sort of guess I'm going to finish my pancake and What do I do? Well, I just go and I start working on the next pancake the same kind of idea here Can be applied to a stack so a stack has a few different sort of we would call them Operations The idea is first we have something we would classify as say a push of An element the idea here is that if I had say this stack over here Let me sort of increase my size a little bit and Let's get rid of you Right here Carry the two go ahead and skip ahead a little bit Until I've got this out of the way. So let's say for example I wanted to push to my stack well the easy way that this would work is that I Would pretty much say push in our case. Let's say push Six Well, what am I gonna do? I'm gonna go to the very end of my stack and I'm just gonna add a six there We actually have the exact opposite as you can imagine. I Have what we would classify as a pop operation. So what does pop do? Well push adds something to sort of the the top of the list in this case six was added Right here I'd have to tackle that six before I got to move to five to four three two one and empty my plate if you will Now what pop does is it pretty much says let's take whatever the top element top pancake top number However, you want to think of it. Let's remove it from the stack and give it back to me six Okay. All right. Those are not the only two because we also happen to have a few other ones These are more sort of the meta logistics. We have something like a top Now top and pop are very similar However, the difference here is that if I made push six Again six is back on here. What top does is it says tell me what the top element is but don't get rid of it but not Removed if you will Okay, well the same kind of concepts can come in maybe instead of just knowing the top element I might want to know the size well in this case We happen to get a six again because I'm using numbers But it just tells me again one two three four five six. All right now finally we have a simple one is Empty empty In this case all it's gonna do is just tell me no it is not it is a bullion