I'm looking for examples to give my students when lecturing about stacks, for use-cases of the stack in programming and life.So far I've been thinking of a pole of rings (when you can insert or remove rings from the top).My students are high school students I'm teaching next year for their matriculation exam. They have only some basic knowledge in procedural programming and the tip of the iceberg in Object-Oriented stuff.Any ideas for more analogies or examples?
What are some good examples of using a stack data structure?
teaching analogy;data structure
I once had to implement a limited undo function (undo changes to the current field, or addition/deletion of records).The lists of undo deltas (one for field changes and one for records) were stored as stacks.