The drawback of this approach, is that with each recursive function call, we only reduce the
size of the array by one element, and we use a storage space for one activation record. A
faster approach is, with each recursive call, reduce the size of the array by 3 elements.
a. Write a reduce-and-conquer recursive function FastRecSum()(C++ or python) that find
the sum of all float (real) elements in an array of size n.
b. Using addition of float (real) values as a basic operation, set up and solve a recurrence
relationship to compute the complexity of your code, as a function of the size n of the array.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here