UVA 10810 WA [Inversion count problem]

Hi! Can you please tell me what’s wrong with this code for counting inversions? It shows wrong answer every time.

In the MergeSort() method, you are declarng ‘c’ as 'long long' but the return-type of the method is 'int'
So this may be the Problem :slight_smile:
Here is my Solution! Inv-Count

Try It!

Hi bradley! Thanks! You’re right, return type was the problem. AC now! :slight_smile: