Strategy Insertion Sort, Smart Linked List

Lab Assignment

The project is due in one week: by the midnight on the day of the next lab. Make sure to include your name in comments of the source files.

  1. Adding Strategy. Review the code for the strategy-based sorting algorithms

    Modify the code and add the third sorting strategy: Insertion Sort. With your project, submit a text file timing.txt where you state the measured run time of all three strategies for the random array of 50,000 elements. In this submitted file, also comment on the differences between run-times of the three algorithms.

  2. Smart Linked List. Review the templated linked-list example the templated linked-list example. Modify this linked list implementation in list.hpp to be doubly linked list. Then use shared_ptr and weak_ptr to make it a smart pointer based implementation. Modify uselist.cpp to demonstrate the operation of your code.
Milestone: Implement the insertion sort strategy.