Consider the following algorithm to sort ‘n’ integers in arrayA[1…n].
First, find the smallest element and swap it with A[1].
Next, find the second smallest element and swap it with A[2].
Repeat the process until all alements are sorted.
Write a small pseudocode for this algorithm.
Then state its worst-case and best-case running times using the
e – notation Show transcribed image text
Expert Answer
An answer will be send to you shortly. . . . .