Lab 11: Quicksort

Tues, Nov. 28

Deadlines


Lab Problem

For this lab, you will be modifying a version of the quicksort algorithm to use iterators instead of array indexing. An initial implementation is provided using the C++ vector class, using array indexing, and you will first convert that version to use vector iterators, and then create a second version using the list class and list iterators.

We will discuss the algorithm for quicksort on Monday, prior to the lab.

An initial version of the quicksort code, using the vector class and array-based indexing, is provided for you: qsort_vec.cpp.

Your basic task is to modify the array-based implementation of the code, converting it to a vector-based implementation. In doing so, you will generate two new versions that use iterators, one for the vector class, and one for the list class: