What would the expected number of swaps in a merge sort be?

3.4k Views Asked by At

If I were given a list of random numbers say x1, x2, .........., xn and these numbers are sorted according to the merge sort algorithm. What would be the number of expected swaps/exchanges which would take place?

1

There are 1 best solutions below

0
On

Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis