2215. Find the Difference of Two Arrays

Given two

0-indexedinteger arrays`nums1`

and`nums2`

, returna list`answer`

of size`2`

where:

`answer[0]`

is a list of alldistinctintegers in`nums1`

which arenotpresent in`nums2`

.`answer[1]`

is a list of alldistinctintegers in`nums2`

which arenotpresent in`nums1`

.

Notethat the integers in the lists may be returned inanyorder.

1 | class Solution { |