Complete the following table with the properties of the indicated sorts. (Note that an "in-place" sort is a sort that doesn't require any additional space beyond the space required to store the input.)
Worst-Case Comparisons | Worst-Case Assignments | Worst-Case Time | Best-Case Time | Average Time | In place? | Stable? | |
---|---|---|---|---|---|---|---|
Selection Sort | |||||||
Insertion Sort | |||||||
Mergesort | |||||||
Quicksort | |||||||
Heapsort |
Choose the best sorting algorithm for each of the following scenarios. You should choose from among selection sort, insertion sort, quicksort, mergesort and heapsort. In each case, justify your answer.
Dr. Arugorizumu has recently submitted a paper claiming that he has developed an algorithm for constructing a balanced binary search tree from a collection of unordered keys in \(\Theta(n)\) time. Is this claim believable? Why or why not?