Hi,
Inversions are defined as when i<j then a[i]>a[j]

Hi,

Inversions are defined as when i<j then a[i]>a[j]

given equip is a={2,3,8,6,1}

consequently reversals are

2,1 3,1 8,6 8,1 6,1 b. the most reversals appear when the equip is in descending enjoin, i.e { n,n-1...1} now, the reversals achieve be any span elements picked from it which is n(n-1)/2 c.Implantation kind basically reduces the reversals by 1 in each interation, hereafter compute of reversals is promptly proportional to the interval of implantation kind, so consequently interval of reversal kind is given by O(n+f(n)) where f(n) is compute of reversals, hereafter if compute of reversals are n then implantation kinds retreat in O(n) still if its n^2, then it retreats in O(n^2) here we insufficiency to distinguish restraint total n where

8n^{2} < 64nlogn

=n < 8logn

=n/8 < logn

i.e n-8logn>0

on solving the coextension we acquire, n=43

consequently restraint n<=43, implantation kind is better