Question: Write an algorithm that sorts an array of size n in decreasing order. Assume that the array contains positive elements whose maximum value is n
Write an algorithm that sorts an array of size n in decreasing order. Assume that the array contains positive elements whose maximum value is n.
Write an algorithm for the above problem.
What is the worst case and the best case of your algorithm?
What is the efficiency class of the algorithm?
Is your algorithm a brute force algorithm? Why or why not?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
