@@ -0,0 +1,758 @@
+import java.util.ArrayList;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Apublic class Solution %7B%0A%0A    public int%5B%5D intersection(int%5B%5D nums1, int%5B%5D nums2) %7B%0A%0A        Set%3CInteger%3E set = new HashSet%3CInteger%3E();%0A        ArrayList%3CInteger%3E intersect = new ArrayList%3CInteger%3E();%0A%0A        for (int i = 0; i %3C nums1.length; i++) %7B%0A            set.add(nums1%5Bi%5D);%0A        %7D%0A%0A        for (int i = 0; i %3C nums2.length; i++) %7B%0A%0A            if (set.contains(nums2%5Bi%5D)) %7B%0A%0A                intersect.add(nums2%5Bi%5D);%0A                set.remove(nums2%5Bi%5D);%0A%0A            %7D%0A%0A        %7D%0A%0A        int%5B%5D result = new int%5Bintersect.size()%5D;%0A%0A        for (int i = 0; i %3C intersect.size(); i++) %7B%0A            result%5Bi%5D = intersect.get(i);%0A        %7D%0A%0A        return result;%0A%0A    %7D%0A%0A%7D%0A

Create : 349 Intersection of Two Arrays