public class Solution { public int[] Intersection(int[] nums1, int[] nums2) { var list1 = nums1.ToList(); var list2 = nums2.ToList(); var list = list1.Intersect(list2); return list.ToArray<int>(); } }
https://leetcode.com/problems/intersection-of-two-arrays/#/description