AlgoMaster Logo

Intersection of Two Arrays II

nums1=[1, 2, 2, 1],nums2=[2, 2]
0 / 16
nums1nums2112222result(empty)two sorted arrays, walk them together to collect shared values
algomaster.io
Step:Find shared values (with repeats) between the two arrays