@@ -0,0 +1,692 @@
+package leetcode;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * https://leetcode.com/problems/intersection-of-two-arrays/%0A */%0Apublic class Problem349 %7B%0A    public int%5B%5D intersection(int%5B%5D nums1, int%5B%5D nums2) %7B%0A        Set%3CInteger%3E set = new HashSet%3C%3E();%0A        for (int num : nums1) %7B%0A            set.add(num);%0A        %7D%0A        Set%3CInteger%3E result = new HashSet%3C%3E();%0A        for (int num : nums2) %7B%0A            if (set.contains(num)) %7B%0A                result.add(num);%0A            %7D%0A        %7D%0A        int%5B%5D arrayResult = new int%5Bresult.size()%5D;%0A        int i = 0;%0A        for (int num : result) %7B%0A            arrayResult%5Bi++%5D = num;%0A        %7D%0A        return arrayResult;%0A    %7D%0A%7D%0A

Solve problem 349