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

Why did they used to make the mill chimneys so tall?

762


what is isolator

1574


Requesting for AMVI genaral studies syllabus

1577


write a c program which accept input as:Anu.B.Kapur and give out as:Kapur.A.B using pointers

1283


who to change a passward in router?

1474






Draw the diagram showing the function stack, illustrating the variables that were pushed on the stack at the point when function f2 has been introduced . type def struct { double x,double y} point; } main( int argc, char *arg[3]) { double a; int b,c; f1(a,b); } f1(double x, int y) {point p; stack int n; f2(p,x,y) } f2(point p, double angle) { int i,j,k,int max;

1620


what is the difference between oracle 8i and 9i. if someone could help me out.

1545


hiiiiiiii to all am going to prepare J.T.O (BSNL)posts am studying B.Tech final year cse........ but its all about electronic subjects....so tell me where can i get previous papers? give me some sites plzzzzzz.........

1802


how much lighting lux need for a common walking area at night time

1800


What is the purpose of dampening roller

1251


if a customer's blackberry stopped syncing their calendar wirelessly what would you do?if a customber deleted mail from his blackberry but it did delete from his mailbox how would ypu resolve this

2555


Hi manikandhan, my name is ruby. Can u pls forward the conduct/character certificate on my Id. ruby_cse07@yahoo.co.in what details shall i require for this certificate. pls help me out with this..its really very urgent.. let me know soon bcoz my interview is on 19th septemper in mumbai...

1635


PLZ SOMEONE TELL ME WHICH TYPE OF QUESTIONS IS ASKED IN HLL(Hindustan latex ltd.)mangmt trainee entrance exam?

1522


How to get the code from internet while i am doing project

1327


Explain the concept of segmentaion.

1699