Back to QuestionsPractice with This Question
Intersection of Two Arrays II (Hash Map)
119.4K views•Asked at Amazon•
Easy
Question Explain
Given two arrays, return an array of their intersection. Each element in the result should appear as many times as it shows in both arrays. Use a Hash Map to store frequencies.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.