- validate brackets with a stack by having a stack that tracks {,[,( as openers and ), ], and } as closers push on openers, pop on closers. When you pop, make sure your opener matches your closer.
- popping on an empty stack causes a failure.
- ending with elements in the stack is an error
#### math evaluation with stacks
- closing brackets means 2 pop from op stack until opening bracket.
- each pop from the op stack is 2 pops from num stack
- after an op, push back to num stack
### queues
- add = queue
- remove = dequeue
- queue has both head and tail, you add to tail, and pop from head.