Skip to content

Commit 05d1214

Browse files
committed
Runtime: 67 ms (Top 10.18%) | Memory: 18.5 MB (Top 5.36%)
1 parent 69a880d commit 05d1214

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/algorithms/S/Special Positions in a Binary Matrix/Special Positions in a Binary Matrix.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
// Runtime: 67 ms (Top 10.18%) | Memory: 18.5 MB (Top 5.36%)
12
class Solution {
23
public:
34
int numSpecial(vector<vector<int>>& mat) {
45
vector<vector<int>>v;
56
map<int,vector<int>>m;
6-
7+
78
for(int i=0;i<mat.size();i++){
89
vector<int>temp = mat[i];
9-
10+
1011
for(int j=0;j<temp.size();j++){
1112
m[j].push_back(temp[j]);
1213
}
@@ -39,4 +40,4 @@ class Solution {
3940
}
4041
return counter;
4142
}
42-
};
43+
};

0 commit comments

Comments
 (0)