Back to Questions

Intersection of Two Arrays II (Hash Map)

119.4K viewsAsked 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.

Practice with This Question