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

posted on 2017-04-19 11:12  Sempron2800+  阅读(84)  评论(0编辑  收藏  举报