Write a recurrence relation for the version of mergesort described above and implemented in DoMerge. What is the solution of this recurrence relation, i.e., the big-Oh complexity of the new version of mergesort? You do NOT need to solve the recurrence, a one sentence justification is sufficient (although you may solve the recurrence).
Write the function SortStudents whose header is given below. SortStudents sorts the information in list so that it is in order from smallest (1) to largest (N) student ID number.
Your solution MUST sort in O(N) time!!
hint: in what slot does the student with ID number 16 belong?
For example, stacks of ints are shown below with the result of merging first and second.
Because stacks first and second are passed as const reference parameters, local copies must be made that can be popped.
Write a function JoinLists that creates a new linked list formed by first copying all the values in list a followed by all the values in list b. Lists a and b should be unchanged --- JoinLists creates a new list. JoinLists returns a pointer to the first node of the newly created list.
The function IsLeaf returns true iff its parameter is a leaf.
(You Don't have to write code, describe a method that works)
For example, in the tree shown below there are exactly four root-to-leaf paths. The sums of the paths are 27, 22, 26, and 18. Thus the value of HasPathSum(t,27) should be true and the value of HasPathSum(t,30) should be false (assuming t points to the root of the tree --- the node whose info field has value 5.)
Write the function DoPrintPath that prints, for each leaf in tree, one line of output consisting of the values stored on the root-to-leaf path. For example, for the tree above the output is shown below.
lemon cherry apple
lemon cherry guava
lemon papaya orange
lemon papaya tangerine watermelon
The function DoPrintPath is called by PrintPath as shown below. You may assume a boolean-valued function IsLeaf exists. Assume that there at most 200 strings stored in any tree. (Note that the Tree struct is now templated).