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

hi my name is ashok i have 55 per and 2 backlogs and one year left may i get above 60 pr

1442


Explain the concept of segmentaion.

1791


describe how your code can determine if the user entered an input box value or click the cancel button?

1692


where is the first engeenering college of Asia

1514


I am refused L1-B visa filed by my employer on May 09 by US consulate Chennai. When i am eligible to apply L1-B visa again through my employer?

1925






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

1562


Which is better field cad/cam in mechanical or film editing/animation is better salary wise?

1513


how to generate linked implementation of sparse matrix?

1574


hai,am a marine engineer..pls anyone tell me what is the abbrevation for "gfca" in Mitsui B&w 7l67gfca engine.my mail id is kamaraj_mech@yahoo.co.in

1672


A family, planning a weekend trip, decides to spend not more than a total of 8 hours driving. By leaving early in the morning, they can average 40 miles per hour on the way to their destination. Due to the heavy Sunday traffic, they can average only 30 miles per hour on the return trip. What is the farthest distance from home they can plan to go? (EXPLAIN WITH PROPER STEPS)

3044


what is locative information on web.........?

1499


what in 4th and 5th normal form ??

1748


how to initialize a pointer to an array?

1588


Hi dost here Alok Kumar please send question pattern for NIC at godinall.kumar1@gmail.com or alok.iitb07@gmail.com

1518


Index of an Array containing 'n' aliment varies from________to_______

1685