For each element of nums, count how many other elements are strictly smaller than it and return those counts in the original order.
nums
nums = [8,1,2,2,3]
[4,0,1,1,3]
nums = [6,5,4,8]
[2,1,0,3]
2 <= nums.length <= 500 0 <= nums[i] <= 100
Topics
Implement smallerNumbersThanCurrent in the editor and return the answer — printing it is never graded.
smallerNumbersThanCurrent
Problem 60 of 1146 in the arena