real-life applications of stack

stack

Solution

Your job.

When reducing staff, many companies are bound by agreements and regulations to use the "Last In First Out" to decide who goes and who stays.

The accountants like this because shorter service equates to lower redundancy payments. The unions or other staff representatives like this because it removes any possibility of favoritism and prejudice or victimization from the choices.

Problem

I was trying to think of some non-CS related applications of the stack concept in the real life, unlike function calling, parsing, DFS, etc. but couldn't come up with any. For queues, I can think of several, e.g. assembly line in a factory, customer servicing in banks etc. but am not able to think of similar ones that work only via pushes & pops in the non-CS part of our daily life. Can someone please suggest somethings?

Original source