These are part of my notes for the Coursera course: Algorithms, Pt I (Princeton).
##Stack
####Concept
- one of the fundamental data types used to manage a collection of objects
- works like a 'stack' of plates
- plates can only be added or removed from the top of the pile
- new items are
pushed
on to the stack - items are
popped
off of the stack - this management method known as a Last In, First Out (LIFO)
####Implementation
- there is more than one way to accomplish this behaviour
- both
linked lists
andarrays
are two fundamental ways to store the data - the rest of the data type then determines when and how the array/linked list is accessed
- this is what determines the stack's behaviour
- both
####See Also