LeetCode 315: Count of Smaller Numbers After Self
Problem Restatement We are given an integer array nums . For each index i , count how many numbers to the right of nums[i] are smaller than nums[i] . Return an array counts , where: counts[i] = number of smaller elements to the right of nums[i] For example, in: nums = [5, 2, 6, 1] the answer is: [2, 1, 1, 0] because: Index Value Smaller values to the right...