University of Nevada Las Vegas
Howard R. Hughes College of
Engineering
School of Computer Science
My Home Page
UNLV CS Spring 2007 Assignment 4

CS 302 Assignment 4
Due date: Thursday, February 15, 2007, 8:30 AM in class.
All written assignments must be handwritten
(not typed or printed from a
computer file) in your own handwriting, on 8.5 by 11 inch paper, or on A4
paper. Write your name on each sheet, and do not fold the pages or crimp the
corners. (You may use a paper clip or a staple.)
-
Using pictures, show how to implement push and pop for each of the
following implementations of the ADT Stack:
-
Array implementation.
-
Singly linked list implementation, with one pointer to the top.
-
Using pictures, show how to implement enqueue and dequeue for each of the
following linked list implementations of the ADT Queue:
-
Simple (i.e., not circular) singly linked list, with front and rear pointers.
-
Cicular singly linked list, with a single pointer to a dummy node.
-
In every known application of the ADTs Stack and Queue, the items on the
Stack or Queue represent ___________________ (two words).
