Skip to content

Commit 5938a8d

Browse files
committed
試行錯誤で提出コードと齟齬があったため修正
1 parent 6f59d61 commit 5938a8d

File tree

1 file changed

+3
-3
lines changed
  • 4.hash-map/intersection-of-two-arrays

1 file changed

+3
-3
lines changed

4.hash-map/intersection-of-two-arrays/step1.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#include <unordered_set>
1+
#include <set>
22

33
class Solution {
44
public:
55
std::vector<int> intersection(std::vector<int>& nums1, std::vector<int>& nums2) {
6-
std::unordered_set<int> seen_in_nums1;
7-
std::unordered_set<int> seen_in_nums2;
6+
std::set<int> seen_in_nums1;
7+
std::set<int> seen_in_nums2;
88
for (int num : nums1) {
99
seen_in_nums1.insert(num);
1010
}

0 commit comments

Comments
 (0)