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
Why did they used to make the mill chimneys so tall?
what is isolator
Requesting for AMVI genaral studies syllabus
write a c program which accept input as:Anu.B.Kapur and give out as:Kapur.A.B using pointers
who to change a passward in router?
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;
what is the difference between oracle 8i and 9i. if someone could help me out.
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.........
how much lighting lux need for a common walking area at night time
What is the purpose of dampening roller
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
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...
PLZ SOMEONE TELL ME WHICH TYPE OF QUESTIONS IS ASKED IN HLL(Hindustan latex ltd.)mangmt trainee entrance exam?
How to get the code from internet while i am doing project
Explain the concept of segmentaion.