Notes About Stacks
- Read -- Chapter 6
- Definition: A data structure such that the next element to
be removd is the last element entered.
- Operations:
- Create
- Insert (push)
- Remove (pop)
- Peek
- Count
- Search the stack (which is not a very 'stacky' operation)
- Use
- Inventory on a shelf
- Accounting using LIFO
- Typing buffers
- Balancing Braces and paranthese and quotes so on
- Palindrome recognition
- Postfix math
- Reversing a list (string)
- Lots more
- How to