An inversion is an array of numbers is any pair (i,j) such
that i<j and A[i]>A[j]. What is the average number of
inversions in an array of n ?
distinct numbers?

Answer Posted / narina thakur

The average number of inversions in an array of N distinct
elements is N(N-1)/4

Proof:
Total number of inversions in a list L and its reverse Lr
is N(N-1)/2. Average list has half this amount, N(N-1)/4.

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

PLEASE SUGGEST THE BALLY PLACEMENT PAPER PATTERN ABOUT WRITTEN TEST,INTERVIEW,HR.ITS URGENT. AS BALLY IS GOING TO VISIT OUR CAMPUS.

1932


what things abutsbi

1578


Explain force?

628


as we know that java is a platform independent language, but we need jvm for the same operating system why?

1368


what is the difference between oracle 8i vs 9i

1767






sample sbi questions paper

1417


how to initialize a pointer to an array?

1492


int main() { int d = 10; int m = 2; int y = 3603; int c = 0; int val; val = ( d + m + y + (y/4) + c) % 7; cout << val; return 0; }

1183


what is your weaknesses

1484


I have Cleared Bank of India Clerical Examination.I just want to know how to prepare for interview and what are the parriculars that I have to submit......Pls someone help me with it

1491


what are the differences between malloc() and calloc() in c language?

1959


i m doing engg in IT .for getting job which courses i have to do?

1500


is the meter head is same as back pressure?

1611


performance test required for a automatic bank teller?

1516


Difference between software process model and software process.?

1495