Python short 1-liner. Functional programming.
Approach\nConvert lists into sets and take a set difference.\n\n# Complexity\n- Time complexity: O(n1 + n2)\n\n- Space complexity: O(n1 + n2)\n\nwhere,\nn1 is l
# Approach\nConvert lists into sets and take a set difference.\n\n# Complexity\n- Time complexity: $$O(n1 + n2)$$\n\n- Space complexity: $$O(n1 + n2)$$\n\nwhere,\n`n1 is length of nums1`,\n`n2 is length of nums2`.\n\n# Code\n```python\nclass Solution:\n    def findDifference(self, nums1: list[int], nums2: list[int]) -> list[list[int]]:\n        return (lambda a, b: [a - b, b - a])(set(nums1), set(nums2))\n\n\n```
['Array', 'Hash Table', 'Python', 'Python3']