q8 consider the following algorithm algorithm secret a o n 1 input an array a 0 n 1 5153869
Q8: Consider the following algorithm. Algorithm Secret(A[O..n-1)) //Input: An array A(0..n – 1] of n real numbers minnal Alo; marnal AO for 1 1 to n – 1 do if Alü < minual minval – Ali if Ai > manual mareal 0 return maral – manual a. What does this algorithm compute? b. Analyze the time complexity of this algorithm by counting how many times the basic operation executed?