WA in submission

I am getting WA in all test cases of the ques, but i have ran many cases and the answer seems to come out correct.

Here is my code - https://ide.codingblocks.com/s/467582

hello @rohitmathur.mathur.6

check now->

Thanks it worked!
But if this question comes in a test or interview , then do we have to count == case in inversion or not?

no u should be

inversion is counted only if a[i]>a[j] for i<j

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.