Skip to content

Commit c830e41

Browse files
authoredSep 22, 2019
Update find-smallest-common-element-in-all-rows.cpp
1 parent 4b22bbb commit c830e41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎C++/find-smallest-common-element-in-all-rows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Solution {
88
unordered_set<int> intersections(mat[0].cbegin(), mat[0].cend());
99
for (int i = 1; i < mat.size(); ++i) {
1010
const auto a = move(intersections);
11-
unordered_set<int> b(mat[i].cbegin(), mat[i].cend());
11+
const unordered_set<int> b(mat[i].cbegin(), mat[i].cend());
1212
copy_if(a.cbegin(), a.cend(),
1313
inserter(intersections, intersections.begin()),
1414
[&b](const int x){ return b.count(x); });

0 commit comments

Comments
 (0)
Please sign in to comment.