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]

loving attire is a={2,3,8,6,1}

accordingly violations are

2,1 3,1 8,6 8,1 6,1 b. the most violations happen when the attire is in descending manage, i.e { n,n-1...1} now, the violations accomplish be any two elements selected from it which is n(n-1)/2 c.Implantation class basically reduces the violations by 1 in each interation, hence enumerate of violations is quickly proportional to the opportunity of implantation class, so accordingly opportunity of violation class is loving by O(n+f(n)) where f(n) is enumerate of violations, hence if enumerate of violations are n then implantation classs operate in O(n) notwithstanding if its n^2, then it operates in O(n^2) here we demand to comprehend ce total n where

8n^{2} < 64nlogn

=n < 8logn

=n/8 < logn

i.e n-8logn>0

on solving the coextension we gain, n=43

accordingly ce n<=43, implantation class is better