The Meta IT mobile support app receives two arrays of feature identifiers from different client configurations. Return the distinct identifiers that appear in both arrays.
The result must preserve the order in which values first appear in nums1. Each value should appear at most once in the result, even if it occurs multiple times in either input array.
Implement intersection(nums1, nums2):
nums1 and nums2 are arrays of integers.nums1.def intersection(nums1, nums2):