Inversion Count In Array Leetcode Question