04/16 Lecture Material
Stack ADT - LIFO
- void push(newEntry)
- Object pop()
- Object peek()
- boolean isEmpty()
- void clear()
Examples
- Demonstrate the operations above.
- Use a stack to check if parentheses are balanced.
There is an algorithm on page 457.
- Translating infix expressions to postfix expressions.
There is an algorithm on page 462.
In Lab 12 Partial Solution