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
Get step-by-step solutions from verified subject matter experts
