Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think how the count of each individual integer affects the final answer.
If the length of nums1 is m and the length of nums2 is n, then each number in nums1 is repeated n times and each number in nums2 is repeated m times.