Assume your sorting algorithms have to deal with lists that can potentially contain duplicates. Assume the same
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Managerial Economics And Strategy
ISBN: 9780134899701
3rd Edition
Authors: Jeffrey M. Perloff, James A. Brander
Posted Date: