Stacks & Queues: Stacks
Common textbook case studies:
- Postfix expression evaluation
- Converting infix expressions to postfix expressions
- Maze searching
- Program stack / recursion evaluation
- Balanced parentheses/braces/brackets
- Palindrome identification (not a good example)
Others:
- Web browser / multiple undo
- Index verification - confirming that the top-level index is
alphabetized, as well as each sublist, subsublist, and so on.
- Implementing
iterator
for a binary tree.
(next)