Count Inversions In Array Leetcode