Given two arrays, return their intersection (elements that appear in both). Each element in the result should be unique.
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]
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
to save progress and use AI features