We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Interesting. It seems that the fast way to count inversions is to do a merge sort and count inversions while merging. It can also be done with trees. But the methods all seem to have some kind of sorting in common. So the answer to rohangz question is probably "no".
Running Time of Algorithms
You are viewing a single comment's thread. Return to all comments →
Interesting. It seems that the fast way to count inversions is to do a merge sort and count inversions while merging. It can also be done with trees. But the methods all seem to have some kind of sorting in common. So the answer to rohangz question is probably "no".