ABSTRACT

This chapter studies the Buffer ADT which is a specialization of a positional collection. It is sometimes called a double-ended queue or deque (pronounced “deck”). In a buffer, items are added or removed only at the ends of the collection. Our buffer implementations wraps a positional collection, to which the actual work is delegated. We consider bounded and unbounded buffers as well as tracked and untracked versions of each.