Skip to content

Commit c664ecb

Browse files
committed
1251
1 parent 2143bb0 commit c664ecb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

1351.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Solution {
2+
public:
3+
int countNegatives(vector<vector<int>>& grid) {
4+
int count=0;
5+
for(int i=0;i<grid.size();i++)
6+
{
7+
for(int j=0;j<grid[0].size();j++)
8+
{
9+
if(grid[i][j]<0)
10+
{
11+
count++;
12+
}
13+
}
14+
15+
}
16+
return count;
17+
}
18+
};

0 commit comments

Comments
 (0)