\documentclass[11pt]{article}


\usepackage{fullpage}
\usepackage{graphicx}
\usepackage{clrscode3e}

\begin{document}

\title{{\bf Class work: Selection-sort}} 

\date{}

\maketitle

Note: As usual, we denote the size of $A$ by $n$. 

\fbox{
\parbox{15cm}{

\begin{codebox}
  \Procname{  $\proc{Selection-Sort}(A)$}
  \li    For $i \gets 0$ \To  (?)    \Do 
       \li    $k \gets$ the index of the smallest element among
       $A[i],A[i+1], ...,A[n-1]$
       \li swap $A[i]$ with $A[k]$
  \End
\end{codebox}

}}


\begin{enumerate}
\item Show how this works on $A= (3,1,5,7,4,6,2)$. 

\item Think about how you would implement line 2 in the algorithm.

 
\item Finish the for loop (What is last  value of $i$?).


\end{enumerate}


\end{document}

