(Solved): Suppose We Have An Algorithm A That Does Comparison-based Sorting. Answer True Or False For Each Of ...
Suppose we have an algorithm A that does comparison-based sorting. Answer true or false for each of the following. Assume our input size is n, and that each of the n inputs is distinct. 1. There can be an input ordering for which algorithm A executes no more than n comparisons to determine the sorted order. 2. There can be an input ordering for which algorithm A executes no more than 2n comparisons to determine the sorted order. 3. There a total of n! different input orderings. 4. There is at least one input ordering that requires (n lg n) comparisons to determine the sorted order