746 views
0 votes
0 votes

The average number of inversions in an unsorted array of n elements is?

(Two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j)

A.) n(n-1)/2

B.) n(n-1)/4

C.) n(n+1)/2

D.) n!/2

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
2 answers
2
argha1992 asked Oct 27, 2018
598 views
What is the average case time complexity of the best sorting algorithm for an array having 2^n^2 elements .I know that the best sorting algorithm is no better than O(n lo...
0 votes
0 votes
3 answers
4
radha gogia asked Jul 17, 2015
987 views
If we talk about that since since we cant access any random element in a linked list for that reason quick sort cant be used for linked lists ,then in merge sort also we ...