We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69a880d commit 05d1214Copy full SHA for 05d1214
scripts/algorithms/S/Special Positions in a Binary Matrix/Special Positions in a Binary Matrix.cpp
@@ -1,12 +1,13 @@
1
+// Runtime: 67 ms (Top 10.18%) | Memory: 18.5 MB (Top 5.36%)
2
class Solution {
3
public:
4
int numSpecial(vector<vector<int>>& mat) {
5
vector<vector<int>>v;
6
map<int,vector<int>>m;
-
7
+
8
for(int i=0;i<mat.size();i++){
9
vector<int>temp = mat[i];
10
11
for(int j=0;j<temp.size();j++){
12
m[j].push_back(temp[j]);
13
}
@@ -39,4 +40,4 @@ class Solution {
39
40
41
return counter;
42
-};
43
+};
0 commit comments