Have u tried BIT Approach????

On Mon, Oct 22, 2012 at 1:40 AM, Aamir Khan <syst3m.w...@gmail.com> wrote:

> What is the best algorithm to print all the inversions in an array? While
> you can find the inversion count using modified merge sort procedure in
> O(nlog(n)) time [1] but I doubt that printing all inversions can also be
> done in O(nlogn).
>
> In an array A[], two elements A[i] and A[j] form an inversion if A[i] >
> A[j] and i < j
>
> [1] http://www.geeksforgeeks.org/archives/3968
>
>
> --
>
> Aamir Khan | 4th Year  | Computer Science & Engineering | IIT Roorkee
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to