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
hi my name is ashok i have 55 per and 2 backlogs and one year left may i get above 60 pr
Explain the concept of segmentaion.
describe how your code can determine if the user entered an input box value or click the cancel button?
where is the first engeenering college of Asia
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?
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
Which is better field cad/cam in mechanical or film editing/animation is better salary wise?
how to generate linked implementation of sparse matrix?
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
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)
what is locative information on web.........?
what in 4th and 5th normal form ??
how to initialize a pointer to an array?
Hi dost here Alok Kumar please send question pattern for NIC at godinall.kumar1@gmail.com or alok.iitb07@gmail.com
Index of an Array containing 'n' aliment varies from________to_______