# I'm preparing my study material to study for an upcoming test, I was wondering if you can help me provide a short but sweet way of memorizing these topics, regarding Stack:what is postpone obligations and what are the advantages/disadvantages of using Stack? If this counts as 2 questions and I need to choose only one, understanding what postpone obligations would be my question please.

Question
1 views

I'm preparing my study material to study for an upcoming test, I was wondering if you can help me provide a short but sweet way of memorizing these topics, regarding Stack:what is postpone obligations and what are the advantages/disadvantages of using Stack? If this counts as 2 questions and I need to choose only one, understanding what postpone obligations would be my question please.

check_circle

star
star
star
star
star
1 Rating
Step 1

Understand the concept of Proposed Obligations by the example shown below-

Suppose a person is relaxing in your garden, sitting on chair and reading the newspaper and the phone rings. He makes a mental note of where he stops reading as he stands to answer the phone. While chatting on the phone with his friend, the doorbell chimes. He says, "just a minute, hold that thought" and put the phone down as he answers the door, as he is about to sign for the package that is being delivered, his dog Tommy runs out the open door. Further, he brings Tommy back to home, then sign for the package, then finish the phone call, and finally return to read the newspaper. In this way, that person has been storing his postponed obligations on a mental stack! Each time he is interrupted, he pushes the current obligation onto this stack and then, when he is free, he pops it from the stack and resume handling it.

Stacks are very useful abstract data types, especially ...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in