Consider the following algorithm: 1: function SumElement(array A) 2: if length(A) == 1: 3: return A 4: else: 5:
A1 ← A[0 : length(A)/2] 6: A2 ← A[length(A)/2 : length(A)] 7: return SumElement(A1) + SumElement(A2) 8: end function 1. Write the running time of this function as a recurrence relation. 2. Describe the running time of this function using big-O notation.
Answer 1- The running time of the algorithm is represented by concerning array's length. If array is a and n is the... View the full answer