Leetcode: Intersection of Two Arrays

Intersection of Two Arrays



Similar Problems:


Given two arrays, write a function to compute their intersection.

Example:

Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].

Note:

  • Each element in the result must be unique.
  • The result can be in any order.

Github: code.dennyzhang.com

Credits To: leetcode.com

Leave me comments, if you have better ways to solve.


## Blog link: https://code.dennyzhang.com/intersection-of-two-arrays

linkedin
github
slack

Share It, If You Like It.

Leave a Reply

Your email address will not be published.