Top

Discussion

Let A[1...n] be an array of n distinct numbers. If i < j> A[j], then the pair (i, j) is called an inversion of A. What is the expected number of inversions in any permutation on n elements ?

  • A.n(n-1)/2
  • B.n(n-1)/4
  • C.n(n+1)/4
  • D.2n[logn]

Answer: B

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment