Given two integer arrays nums1 and nums2 of sizes n and m respectively, calculate two values:
The number of indices i such that nums1[i] occurs at least once in nums2.
The number of indices i such that nums2[i] occurs at least once in nums1.
Return an integer array answer of size
Constraints:
n == nums1.length
m == nums2.length
n, m
nums1[i], nums2[i]
Given two integer arrays nums1 and nums2 of sizes n and m respectively, calculate two values:
The number of indices i such that nums1[i] occurs at least once in nums2.
The number of indices i such that nums2[i] occurs at least once in nums1.
Return an integer array answer of size
Constraints:
n == nums1.length
m == nums2.length
n, m
nums1[i], nums2[i]