Asked Feb 4, 2020

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.


Expert Answer

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

Check out a sample Q&A here.

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


Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A

Q: in Python use turtle graphics to create a lightning bolt

A: Following is the python program that use turtle graphics to create a lightning bolt: Approach:Import...


Q: Write a Python statement that would print just the fourth name in the pals list above.

A: List:Lists are the same as arrays. The list is the most flexible datatype available in Python that c...


Q: What is the meaning of the term Magnitude?

A: Magnitude:The word “magnitude” is obtained from the Latin word “magnus” that represents big.The magn...


Q: Write code to complete PrintFactorial()'s recursive case. Sample output if userVal is 5: 5! = 5 * 4 ...

A: The factorial is represented by ! (exclamation mark). Factorial is the product of all whole numbers ...


Q: num = 12File nums.txt is open in write mode and associated with object myfile. Write a Python statem...

A: In this question, the write function is used to open in write mode in pythonFunction: 1.  Write used...


Q: Module/Week 3 ASSIGNMENT (CONTROL STRUCTURES . IF ..ELSE)Write a C++ program that computes a student...

A: Instructions for the given program:For the given program, there should exist a file with the name “R...


Q: Hi, I am programming in java. The instructions require: Create a new project and call it Project8. C...

A: All the changes are commented above the modified or added line.In main() method Mymethod() called an...


Q: Write the pseudocode for a problem that will accept the number of (not value of) quarters, dimes, ni...

A: Pseudo Code: It is used to describe the step by step details of a program.It is used to explain the ...


Q: Please answer as soon as posibble.

A: The code given below is written in Python programming language.The output of the code is arg1: john,...