Computer Science City College of New York
  CSc212 Section FG Data Structures

Lecture 12 (II) Queues

The code could be found at http://www.cs.colorado.edu/~main/chapter8/
 

Queue Template Class with a Fixed-Size Array (Our Implementation, Section 8.3)

    The Header file queue1.h

    The Implementation file queue1.template

Note: the queue templat class uses circular arrary

Queue Template Class with a Linked List (Our Implementation, Section 8.3)

    The Header file queue2.h

    The Implementation file queue2.template

Note: the queue templat class uses the linked list with node template class (node2.h and node2.template)

Two Application Programs (Using STL <queue>)

 1.   Recongnizing Palindromes using both stack and queue pal.cxx

    A palindrome is a string that reads the same forward and backward, for example

        Input:       radar
        Stack output: radar
        Queue ouput: radar

    One real application: the analysis of genetic materials

2.    Car Wash Simulation washing.h, washing.cxx

        Read Section 8.2



Feng HU ( fhu@gradcenter.cuny.edu )