This time I’m keeping it ultra-simple: The Stack.
I’m sure we all know what a stack is, but to briefly remind you it’s a LIFO (Last-in, first-out) container. In a classic stack elements are added on top of the stack using the “Push” command and removed from the top one-by-one using “Pop”. When an element is popped it is removed from the stack and returned. It is not possible to reference elements that are not on the top of the stack.
A not-so-classic stack variation contains a “Peek” function that will return the top element of the stack without removing it.
So without further ado let’s jump into modeling!