Exercises/#117 Intersection of Two Arrays
#117

Intersection of Two Arrays

EasyπŸ“¦ Arrays
40 XP

Problem

Given two arrays, return their intersection (elements that appear in both). Each element in the result should be unique.

Examples

Input: nums1 = [1,2,2,1], nums2 = [2,2]
Output: [2]

Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]
Output: [4,9]
arrayhash-set
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

117 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features