Count Number Of Inversions Leetcode Javascript Questions