A third answer — enqueue and dequeue at one end, enqueue at
the other — seems unreasonable, at least until you think of
an input stream as a queue. The reader of the queue removes characters one at
a time, but occasionally may read too far and want to push back the most
recently read character (or perhaps some other character).
This page last modified on 24 January 2006.