Skip to content

Commit e42e57c

Browse files
committed
1365
1 parent 2598a0a commit e42e57c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

1365.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
class Solution {
2+
public:
3+
vector<int> smallerNumbersThanCurrent(vector<int>& nums) {
4+
5+
vector<int>A;
6+
for(int i=0;i<nums.size();i++)
7+
{
8+
int max=nums[i];
9+
int count=0;
10+
for(int j=0;j<nums.size();j++)
11+
{
12+
if(nums[i]>nums[j])
13+
{
14+
count++;
15+
}
16+
}
17+
A.push_back(count);
18+
19+
20+
21+
}
22+
return A;
23+
24+
25+
}
26+
};

0 commit comments

Comments
 (0)