SE 233
In C++, take integer arrays, turn them into heaps, and then sort them (using heap sort). First, implement the function heapSortVector(). This function will take the array argument and first convert it to a vector (using the function toVector() - you must implement this function!). It will then use iterators to turn the vector's data into a heap. You must use iterators. You are allowed to use any of the standard algorithms to do this. Next, you need to sort the heap - you are not allowed to call std::sort or std::sort_heap! You may use any other standard algorithms. When you are finished, you will want to copy the vector's sorted data back over to the array.
Next, implement the function heapSort(). Operate directly on the arrays, and not convert it to a vector. Note that STL iterators work on arrays! Where you would typically call begin(), you can simply give the name of the array. Where you would expect end() you can give 'arr + N'. The logic of this function is similar to the previous one, except you won't convert to a vector at the start, won't need to copy data out of the vector at the end, and the begin/end iterators are defined differently.