COSC 350: Data Structures
March 13, 2009


ADTs for Stacks and Queues

Key Points:

Container Classes.
Do not confuse an ADT with the implementation of an ADT. The ADT is the abstract "blueprint".
There is no ONE correct ADT. ADT design depends in part on how you plan to use the data.
If the implementation changes, but remains consistent with the ADT, applications using the ADT should continue to work.
UML diagrams, Notation, Pseudo code

Linked List Implementation of Stacks and Queues

Selecting the end of a linked list to add and remove from:
Stacks: easier to add and remove from head
Queues: easier to add to tail and remove from head (could use doubly-linked list)

Code from class: Stacks, Queues


This page was created by Joe Sloan.
It was last modified on or after: 16 March 2009
Send mail to: sloanjd@wofford.edu