Inversion count

ques : https://practice.geeksforgeeks.org/problems/inversion-of-array/0

code : https://ide.codingblocks.com/s/210816

my code is correct… but all the test cases are not passing
can you tell what is the mistake?