For my test tomorrow, I will need to be able to:
explain how stack and queue are special cases of a list.
Does anyone know a good place where I can read about this? A Google searches can’t help me with this one, it’s one of those “We discussed this in class, don’t ask me again” type of questions.
List supports insertion and deletion at any place.
Queue supports insertion at tail and deletion at front.
Stack supports insertion and deletion from top.
It’s easy to see that queues and stacks support only a subset of list operations. In this sense they are special cases of a list.