[LeetCode] 1365. How Many Numbers Are Smaller Than the Current Number
Python
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
answer = []
for num in nums:
temp = [i for i in nums if i < num]
answer.append(len(temp))
return answer
댓글남기기