(adevise an algorithm to sort three numbers it should make as few comparisons as possible how many comparisons and swaps are required in the bestworstand average cases(bdevise an algorithm to sort five numbers it should make as few comparisons as possible how many comparisons and swaps are required in the bestworstand average cases(cdevise an algorithm to sort eight numbers it should make as few comparisons as possible how many comparisons and swaps are required in the bestworstand average cases devise an efficient algorithm to sort set of numbers with values in the range to , there are no duplicates keep memory requirements to minimum which of the following operations are best implemented by first sorting the list of numbersfor each operationbriefly describe an algorithm to implement itand state the algorithm' asymptotic complexity (afind the minimum value (bfind the maximum value (ccompute the arithmetic mean (dfind the median ( the middle value(efind the mode ( the value that appears the most times consider recursive mergesort implementation that calls insertion sort on sublists smaller than some threshold if there are calls to mergesorthow many calls will there be to insertion sortwhy implement mergesort for the case where the input is linked list counting sort (assuming the input key values are integers in the range to works by counting the number of records with each key value in the first passand then uses this information to place the records in order in second pass write an implementation of counting sort (see the implementation of radix sort for some ideaswhat can we say about the relative values of and for this to be effectiveif nwhat is the running time of this algorithm use an argument similar to that given in section to prove that log is worst-case lower bound for the problem of searching for given value in sorted array containing elements projects one possible improvement for bubble sort would be to add flag variable and test that determines if an exchange was made during the current iteration if no exchange was madethen the list is sorted and so the algorithm