Extracted text: In the box below, write the two required parts to a recursive algorithm or implementation. In the box below, write a recursive function that calculates the sum of integers from M to N inclusive. You may assume M is less than or equal to N. Write a recursive function called poweroftwo that retums the k" power of 2. As an example, the call poweroftwo(3) returns the value 8 (l.e. 2^3) and the call poweroftwo(5) would retum 32. The initial argument is non negative.
Extracted text: Use the following code to answer the questions on this page. void print(int arr[], int size, int curNode) { int main(){ int leftChild, rightChild; leftChild = curNode * 2 + 1; rightChild = curNode * 2 + 2; int arr[7] = {3, 5, 1, 7, 6, 4, 2}; print(arr, 7, 0); if (leftChild >= size) { return e; return; } print(arr, size, leftChild); Example invocation list if it takes 3 recursive calls to complete and return to main. This is an example to show the ordered list, it is not print(arr, size, rightChild); for the above code. e: print(arr, 24, 0) 1: print(arr, 24, 23) 2: print(arr, 24, 34) 3: print(arr, 24, 47) cout « arr[curNode] «' '; return; Q: (TOP RIGHT) Write a list, similar to above, containing all the function invocations performed by the given code. The number preceding the function call is the order of invocation. Use literal numbers for the third argument. e: print(arr, 7, 0) Scratch notes can go in here or anywhere that isn't a solution bax.