Question
A shop has a stack of chocolate boxes each containing a positive number of chocolates. Initially, the stack is empty. During the next N minutes,
A shop has a stack of chocolate boxes each containing a positive number of chocolates. Initially, the stack is empty. During the next N minutes, either of these two things may happen:
The box of chocolates on top of the stack gets sold
You receive a box of chocolates from the warehouse and put it on top of the stack.
Determine the number of chocolates in the sold box each time he sells a box.
Notes
If Ci he sells a box. If Ci he receives a box containing CI chocolates.
It is confirmed that he gets a buyer only when he has a non empty stack.
The capacity of the stack is infinite.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started