Intersection of Two Arrays II (LeetCode 350): Interview Notes Problem: Given two integer arrays, return their intersection. Each element appears as many times as it shows in both arrays; output order is arbitrary. Approach: Count frequencies with a hash map on the smaller array, then scan the other collecting matches and decrementing counts. If both are sorted, two pointers also work without a hash map. Complexity: Time O(n + m), space O(min(n, m)). Practice tip: Practice the counter vs two-pointer branch with an AI interview assistant: https://www.linkjob.ai/ Disclosure: I work on Linkjob AI.