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 SUGGEST THE BALLY PLACEMENT PAPER PATTERN ABOUT WRITTEN TEST,INTERVIEW,HR.ITS URGENT. AS BALLY IS GOING TO VISIT OUR CAMPUS.
what things abutsbi
Explain force?
as we know that java is a platform independent language, but we need jvm for the same operating system why?
what is the difference between oracle 8i vs 9i
sample sbi questions paper
how to initialize a pointer to an array?
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; }
what is your weaknesses
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
what are the differences between malloc() and calloc() in c language?
i m doing engg in IT .for getting job which courses i have to do?
is the meter head is same as back pressure?
performance test required for a automatic bank teller?
Difference between software process model and software process.?