Q.1. Write a recursive function that follows the “divide and conquer” approach to recursively calculate the sum of all the numbers in an array. The function should accepts as parameters: an array of integers, the index of the first element in the array, and the index of the last element in the array. You can test this function in a driver program, but you do not need to submit the driver program.
Q.2. Using the example of linked list of students’ records that we talked about in the class, with each record having the id and age of the student, write a function that counts the number of students on the list who are older than a specific age. The function should accepts as parameters a pointer to the head of the list, the specified age, and should return the computed value. The driver program main.cpp can be found in the assignment folder on the Blackboard.
Q.3. Using the example of linked list of students’ records that we talked about in the class, with each record having the id and age of the student, write a function that makes a copy of the list of students. The function should accepts as parameters a pointer to the head of the list, and should return a pointer to the head of the backup list (the order of the elements in the backup list can be the reverse order of the elements in the original list). The driver program main.cpp can be found in the assignment folder on the Blackboard.