Skip to content

Commit df1a349

Browse files
committed
Merge pull request #110 from Vally79/master
fixed typo
2 parents 8dd681c + ae2a0d1 commit df1a349

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algorithms/cpp/intersectionOfTwoArrays/intersectionOfTwoArrays.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Solution {
2222
for(int i = 0; i < nums1.size(); i++)
2323
inter1.insert(nums1[i]);//get all of the unique elements in nums1 sorted
2424
for(int i = 0; i < nums2.size(); i++)
25-
if(inter1.find(nums2[i]) != inter1.end())//search nums1 in O(logN)
25+
if(inter1.find(nums2[i]) != inter1.end())//search inter1 in O(logN)
2626
inter2.insert(nums2[i]);//populate the intersection set
2727
for(set<int>::iterator it = inter2.begin(); it != inter2.end(); ++it)
2828
solution.push_back(*it);//copy the set into a vector

0 commit comments

Comments
 (0)