Q5
Suppose we want to put an array of n integer numbers into descending numerical order. This task is called sorting. One simple algorithm for sorting is selection sort. You let an index i go from 0 to n-1, exchanging the ith element of the array with the maximum element from i up to n. Using this finite set of integers as the input array {4 3 9 6 1 7 0}:
Perform the asymptotic and worst-case analysis on the sorting algorithm been implemented. (AN)10 marks
Write or draw all the iterations in the selection sort process on the array.(AP)5 marks