Outline



Linked stack: implementation using linked nodes



Linked Stack performance



Other stack implementations, using a java Vector or List



Stack Applications: Palindromes



Stack Applications: Matching Parentheses



infix expressions



parenthesized infix expressions



integer operators



other kinds of expressions



algorithm for postfix computation



StringBuilder



queues



queue interface



queue applications



queue implementation strategies



array implementation of queues



in-place array implementation



implementation of the method offer



amortized runtime analysis



implementation of the method poll



data structure traversal



depth-first traversal