CS 302 - Data Structures

Fall 2016

Programming Assignment 2 : Recursion

Due on Tuesday, Oct 4 at 4:00 pm

Modified from Programming Problem 4 on Page 94

Implement the algorithm kSmall, discussed in Section 2.4.3, as a C++ function. Use the first value of the array as the pivot.

Use the main file that tests the class with data from a text file. Your code should work for any given file that has integers enumerated in a file (one value per line).

Use the Doxygen to generate documentation for the code you developed.

Deliverables:

  1. Source code for your class
  2. Updated main file
  3. Doxygen report for code documentation (as a pdf file)
  4. Test output of your code (i.e., the kth smallest value with given data file)
  5. A log file of traces (i.e. log.txt) showing pivot value and state of the array after the partitioning of each round

Teaching Assistant:Shehryar Masaud

What to turn in: A softcopy of your sourcecode and reports should be uploaded to WebCampus. Do not compress as a zip file or combine as a tar file.