Dsa 02 - martinbalke-401-adavanced-js/seattle-javascript-401n14 GitHub Wiki
DSA 02
Stacks are a form of data structure not unlike Lego blocks. They represent a stack of data or functions one on top of each other. The main functions of a stack data structure are peek, pop and push. Peek is used to check the top of a stack and to verify that the top of the stack is not empty before trying to pop something off. Push is used to to put an item on to the top of the stack. And pop is used to take something off. Stacks operate in a first in last out manner.
Queues are the second form of data structure we are discussing today. In my mind they operate in a very similar manner to linked lists with the caveat of having a tail. This allows you to do actions from the end of the data structure as well as from the beginning.