Question: 1: function SUMELEMENT array A 2: if length(A)1: 3: return ?? 4: else: 6: 7: 8: end function Al ? A10 : length(A)/2] A2Allength(A)/2 length(A)]

1: function SUMELEMENT array A 2: if length(A)1: 3: return ?? 4: else: 6: 7: 8: end function Al ? A10 : length(A)/2] A2Allength(A)/2 length(A)] return SumElement(A1) + 2* SumElement(A2) Assume that items in the first half of array A are copied into array A1 and the items in the second half of array A are copied into array A2 (i.e. these are O(n) operations) 1. Write the running time of this function as a recurrence relation. 2. Using Master Method give the running time complexity of this function in Big O notation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
