Data Structures and Algorithms Lecture Notes

14 February 2011 Queues


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 2006 January 24.