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
how can read number 1 to 100,without use anyloop.
#include
how to store the vacuum in tank? its possible? what are the units for measure the vacuum ?
how can one get scholership based on gre score ang how much scholarship one can get, plz suggest the way one can apply and get scholarship
what do you mean by a p-code?
hi friends i am b-tech in computer science having interview of State bank of india clerk day on 30 th april. I want to know the answer of question:"you r B.tech in C.S. why do u want to become a bank clerk?" please help.Its my humble request.
What is the dewpoint of atmoshperic Air?
hey..... anybody here from CG? i m from CG n have been selected in the written xam sbi(clerical).interview date is 5/5/2010. answer me if anybody is there 4m CG
requirement:To move display statements in a cobol program to a dataset.These display statements were not in main program but in calling program and we were not allowed to move these info via sysout dd dsn='dataset.name' . please let me know the ways this can be handled
PLEASE SUGGEST THE BALLY PLACEMENT PAPER PATTERN ABOUT WRITTEN TEST,INTERVIEW,HR.ITS URGENT. AS BALLY IS GOING TO VISIT OUR CAMPUS.
why we select you?
Hello, I need to compare, using a cobol program, two cobol skeletons. I don't know if it is easy to do this or it will be so complicated. I wanna have your opinions. Thanks a lot
In HSE what is Lost time accident? why it is to be reported within 48 hrs to gov.authorities ?
how does data cleansing framework works?
compair and contrast procedrual and object oriented programming language