Count Inversion Leetcode Problem Solving