Arrays

Gideon Selasi asked 3 years ago

Q1. Suppose we want to put an array of n integer numbers into ascending numerical order. Thistask is called sorting. One simple algorithm for sorting is selection sort. You let an index i gofrom 0 to n-1, exchanging the ith element of the array with the minimum element from i up to n.Using this finite set of integers as the input array {4 396170}:Perform the asymptotic and worst-case analysis on the sorting algorithm been implemented. ii.Write or draw all the iterations in the selection sort process on the array.iii.Write a java or C++ code implementing the algorithm.