Vectors, Stacks, and Queues

Due: 30 Sep 2014

Educational objectives:

Statement of work: (i) Implement generic vector, stack, and queue classes, (ii) evaluate a recursive function, and (iii) analyze time complexities.

Deliverables:

Requirements:

Sample executable: A sample executable is available at ~cop4530/fall14/solutions/proj2/recurse on linprog. The first person to find errors in our program will get a bonus point!

Notes:

  1. You should not use the STL list, vector, deque, stack, or queue classes. You may use the string class. Please get my written permission before using any other STL feature.
  2. We will test your Vector, stack, and queue classes on entirely different applications. So it is important for these classes to be generic and exactly as specified.
  3. You will get 5 bonus points if, in addition to the recursive implementation of the above function, you also provide an iterative implementation that explicitly uses a stack object to simulate the recursive implementation. This implementation should be in a file called RecurseStack.cpp and the corresponding executable should be named RecurseStack. Please email the TAs if you submit this additional file.

Last modified: 26 Sep 2014