CIS-3050 Homework #6: Reverse List

Due: Wednesday, October 5, 2016

  1. Make a modification to SingleList.h from the last assignment to add the declaration of a function that reverses a list.

            void SingleList_reverse( SingleList *object );
          
  2. Implement SingleList_reverse so that it runs in linear time. It should work by flipping the direction of all the links; it should not move the actual data items at all.

  3. I recommend you write some test cases for your function, but you don't need to submit your tests (I'll use my own).

Submit your modified file SingleList.cpp only (put your name in comments). Don't submit the entire project or solution!


Last Revised: 2016-09-25
© Copyright 2016 by Peter C. Chapin <PChapin@vtc.vsc.edu>