Easy · Hashing · about 5 minutes
Asked at Meta, Google, Amazon, Bloomberg, MongoDB, Shopee.
List the values that occur in both nums1 and nums2. Include each shared value only once; order doesn't matter.
nums1
nums2