Currently, most people store their dirty laundry in a laundry basket, or as a pile on the floor. This laundry is accessed in a last in, first out (LIFO) manner when items are taken from the top for cleaning, and added to the top for storage, pending cleaning.
This system is suboptimal for a number of reasons.
- Variable processing duration means the amount of time any given piece of laundry will take to be cleaned cannot be predicted with accuracy.
- Wet towels at the bottom of the pile have the potential to grow mould.
- White-tailed spiders like to move into piles of clothes that have been there for a while in Summer, so we should keep those moving.
I propose that a first in, first out (FIFO) system for storing dirty laundry would solve these problems – where the former system could be described as using the stack abstract data type, the proposed would use a queue, so that the oldest laundry items would be cycled first.
The “unsolved problem”? The lack of an implementation for the queue ADT in this problem domain. The stack-oriented laundry basket may be the intuitive data structure of clothing economics for home and business, but a queue-suitable alternative is not immediately apparent.
I leave this to the reader. Let me know what you come up with.