If the following is the data section of a linked list templa…

If the following is the data section of a linked list template class called MyList (where T is the type of the stored data), write the definition of the move constructor for this class, as it would appear in the corresponding mylist.hpp file for the class definitions (i.e. not inside the class declaration block): private: MyNode * front; // pointer to the first node in the list MyNode * back; // pointer to the last node in the list int count; // the number of elements stored in the list

Suppose the following is the data section of a binary heap t…

Suppose the following is the data section of a binary heap template class called Heap (where T is the type of the stored data). Assume that we have set up the member data such that index 1 of the stored vector is the root of the heap. private: std::vector array; // array that stores heap (index 1 is root) int count; // number of data elements in the heap In the context of the definition file heap.hpp, write a Heap class member function InOrderPrint() that will print all of the data of the heap using the in-order traversal ordering, space-separated between items. You may break up the job by writing any helper functions that you like, but the outside user of a heap object h must be able to simply make this call to invoke the operation: h.InOrderPrint();

Suppose that we are using a quick sort algorithm to sort the…

Suppose that we are using a quick sort algorithm to sort the following vector 53, 3, 37, 78, 27, 19, 47, 81, 40, 77, 93, 29, 52, 15, 65 Suppose that the pivot element chosen is 52.  Which of the following would be a valid state of the vector after the first partitioning step (but before the recursive calls on the partitions)?