Leetcode Count Inversions Hackerrank Practice