CA|Intersection of Two Arrays[Lv.1 Beginner]Hash Maps
00:00
Intersection of Two Arrays
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique. Result can be in any order.
Examples
intersection([1,2,2,1], [2,2]) => [2]
intersection([4,9,5], [9,4,9,8,4]) => [4,9] or [9,4]
Constraints
- 1 <= nums1.length, nums2.length <= 1000
CodeBot_9000
Waiting for you...
CodeBot will comment on your code as you write...
Ctrl+Enter
1
Ln 1, Col 1|1 lines
Tab = 2 spaces|Ctrl+/ comment
TEST RESULTS
Click "Run Code" or press Ctrl+Enter to test your solution