2. This question should be answered on the sheet provided.
\begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{acc09687-11a3-4392-af17-3d4d331d5ab4-03_1239_1442_306_283}
\captionsetup{labelformat=empty}
\caption{Fig. 1}
\end{figure}
The data
$$x _ { 1 } = 8 , \quad x _ { 2 } = 2 , \quad x _ { 3 } = 4 , \quad x _ { 4 } = 3 , \quad x _ { 5 } = 5 , \quad x _ { 6 } = 1 , \quad x _ { 7 } = 7 ,$$
is to be used in the algorithm given in Figure 1.
- Complete the table on the answer sheet recording the results of each instruction as the algorithm is applied and state the final output using the given data.
- Explain what the algorithm achieves for any set of data \(x _ { 1 }\) to \(x _ { n }\).