Stacks
2
Stacks
-
Upload
anonymous-v7p5fnqi -
Category
Documents
-
view
218 -
download
0
description
Stacks
Transcript of Stacks
Stacks
• Many applications naturally use stacks in programming:• In the system: method calls and returns -- track points of return for
each call• Parsing expressions in context-free programming languages; nested
languages/control structures• Translating infix (algebraic) expressions to postfix and evaluating
postfix expressions (interpreter for arithmetic expressions)• "Undo" features in word processing, etc.• Maintaining link histories in a web browser (for support of
the back operation)• Stack -> email inboxes
Properties: - The one that was sent last will stay on the top in the inbox