Count Inversion Leetcode Problem 543 Area