美文网首页
349 350 Intersection of two arra

349 350 Intersection of two arra

作者: greatseniorsde | 来源:发表于2018-02-07 04:48 被阅读0次

    349

    1. hashSet remember to remove
    2. one is small one is large binary search
    3. sort two arrays using two pointers
    1. Intersection of Two Arrays II
      Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]
      hashmap
      sort + two pointers

    相关文章

      网友评论

          本文标题:349 350 Intersection of two arra

          本文链接:https://www.haomeiwen.com/subject/evtozxtx.html