Question: Assume your sorting algorithms have to deal with lists that can potentially contain duplicates. Assume the same sorting algorithms as discussed in class / in
Assume your sorting algorithms have to deal with lists that can potentially contain duplicates. Assume the same sorting algorithms as discussed in class / in the textbook.
(a) What is the running time of Insertion Sort when all elements in a given list of length N are equal? Explain your answer.
(b) Give a ?-bound on the running time of Mergesort for the case that all elements in a given list of length N are equal (assuming N is a power of 2). Explain your answer.
Step by Step Solution
3.49 Rating (156 Votes )
There are 3 Steps involved in it
Solution A When entire or all elements in a givened list of length N are equal or equi... View full answer
Get step-by-step solutions from verified subject matter experts
