Skip to content

Commit 90fd493

Browse files
authored
Create Count of Smaller Numbers After Self
1 parent 3c0d8f4 commit 90fd493

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def countSmaller(nums):
2+
result = []
3+
for i in range(len(nums)):
4+
count = 0
5+
for j in range(i + 1, len(nums)):
6+
if nums[j] < nums[i]:
7+
count += 1
8+
result.append(count)
9+
return result

0 commit comments

Comments
 (0)