 I got another request for content, although this time it was actually for heaps and then that got me thinking that I really haven't done anything on the containers. Now there is content on containers, whether on blog post type things or even on YouTube, but overwhelmingly they cover the use of the containers, not really what the container is. Sometimes I'll mention a little bit, but I wanted to explain what these are, rather than how to use them, because I think once you understand what they are, how to use them just kind of comes naturally, but I do have use cases at the end. So with that in mind, one of the first things to cover is one of the simplest containers, stacks, some of the concepts behind a stack, really simple container, one of the operations, one of two, you only need two for this to work, is push. Now showing off how this works, if we push a one onto the stack, the stack now holds a one, if we push a two onto the stack, the top of the stack, the part that you would actually get anything from, as I'll show in a moment, is now two, and the two links down to the one. We push a three on, the three's on the top, links down to two, and we push a four on before it links down to the three. So the four is at the top of the stack, again the part we find interesting. The other operation that makes a stack work is pop. This works the opposite way. We pop a four off, you get the four back, the three, or we pop the top off rather, you get the four back, the three is now on the top. So if you pop this off, you get the three, two is now on the top of the stack. Pop this off, you get a two, one is on the top of the stack, and you pop this off, you get a one, the stack is cleared. So some of the uses for stacks. Being such a simple container, you really don't see too many uses of this, but it does have important uses. You see it very often in computer science with backtracking, typically for like the function call stack, if you've ever used a debugger and seen all the different places an exception was risen through, this is one of those uses. You also see them for backtracking through trees. You pop the different locations you descend to on the tree onto a stack so that for backtracking you can just pop off the stack and get the previous locations in the trees. This is because generally to save some space, the nodes on a tree do not point to its parent. That will make a little bit more sense when we cover trees. It also has some uses in parsing, although that's generally not seen. Again typically you see parsed trees, which is a special kind of tree, but stacks are useful especially for parsing very simple grammars. And interestingly I almost never see this one mentioned, and I think it's because a lot of computer science people don't really have business backgrounds, but it's used a lot as well in a LIFO accounting or inventory. There's sort of mixed opinions on whether this is a good thing or maybe even if it should be outlawed. There's arguments for and against it, and I'm going to try to stay out of that. But stacks can be used to implement a LIFO accounting system in software. So next up will be queues.