Question: Let S be a random permutation of n distinct integers. Argue that the expected running time of insertion-sort on S is (n 2 ).
Let S be a random permutation of n distinct integers. Argue that the expected running time of insertion-sort on S is Ω(n2).
Step by Step Solution
3.59 Rating (170 Votes )
There are 3 Steps involved in it
Half of the elements ranked in the top half of a sorted ve... View full answer
Get step-by-step solutions from verified subject matter experts
