UGC-NET | UGC NET CS 2016 July – III | Question 32

Last Updated :
Discuss
Comments

Let A[1...n] be an array of n distinct numbers. If i < j and A[i] > 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 ?

n(n-1)/2

n(n-1)/4

n(n+1)/4

2n[logn]

Share your thoughts in the comments