This problem set is due on Wednesday April 29, 2020 at 20:00 Central, to be submitted on Gradescope. Each problem is worth 10 marks in total.
\begin{algorithm}
\begin{algorithmic}
\PROCEDURE{algorithm3}{$A$}
\IF{$|A| == 1$}
\RETURN{$(A[1],A[1])$}
\ELIF{$|A| == 2$}
\IF{$A[1] \leq A[2]$}
\RETURN{$(A[1],A[2])$}
\ELSE
\RETURN{$(A[2],A[1])$}
\ENDIF
\ELSE
\STATE $m = \left\lfloor \frac n 2 \right\rfloor$
\STATE $A_1 = A[1,\dots,m]$
\STATE $A_2 = A[m+1,\dots,n]$
\STATE $(\min_1, \max_1) = $ algorithm3($A_1$)
\STATE $(\min_2, \max_2) = $ algorithm3($A_2$)
\STATE $\min = \min(\min_1,\min_2)$
\STATE $\max = \max(\max_1,\max_2)$
\RETURN{$(\min,\max)$}
\ENDIF
\ENDPROCEDURE
\end{algorithmic}
\end{algorithm}