#2215 - Find the Difference of Two Arrays
Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where:
answer[0]is a list of all distinct integers innums1that are not innums2.answer[1]is a list of all distinct integers innums2that are not innums1.
The integers in each list may be returned in any order.
| Input | Output |
|---|---|
nums1 = [1,2,3], nums2 = [2,4,6] | [[1,3],[4,6]] |
nums1 = [1,2,3,3], nums2 = [1,1,2,2] | [[3],[]] |