Short and fast answer to 1365. How Many Numbers Are Smaller Than the Current Number
class Solution:
    def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
        numss = sorted(nums)
        return [numss.index(x)  for x in nums]
Comments (0)