Inversion Count Problem Leetcode