InterviewSolution
Saved Bookmarks
| 1. |
In a permutation a1…..an of n distinct integers, an inversion is a pair (ai, aj) such that i aj. If all permutations are equally likely, what is the expected number of inversions in a randomly chosen permutation of 1…..n ?(A) n(n – 1)/2(B) n(n – 1)/4(C) n(n + 1)/4(D) 2n[log2 n] |
| Answer» None | |