An inversion on an element arr[i] is the number of element such that
0<=i<j<n
 , arr[i] > arr[j]

i.e the number of elements to the right that are smaller than the
current element.
so 5 4 3 2 1 will have inversion table 4 3 2 1 0
1 2 3 4 5 will have inversion table 0 0 0 0 0
and 5 3 2 4 1 will have inversion table 4 2 1 1 0.
Now i am given the inversion table and i need to reconstruct the
original array.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to