## 23.2.3 Deque - Example

Example: time-driven simulation of the line in front of a tellers' counter at a bank.

- Each minute there's a .9 probability that a new customer arrives
  - Add to the end of customer deque
- Each transaction takes from 2-8 minutes (random)
- Calculate the avg. time a customer stands in line
- Each minute, examine and update the status of every teller in the teller deque, working off the front of the customer deque

prev |top |next