Python 3: TC = O(n) , SC = O(n)
Complexity\n- Time complexity: O(n)\n- Space complexity: O(n)\n\n# Code\n\nclass Solution:\n    def findIntersectionValues(self, nums1: List[int], nums2: List[i
# Complexity\n- Time complexity: **O(n)**\n- Space complexity: **O(n)**\n\n# Code\n```\nclass Solution:\n    def findIntersectionValues(self, nums1: List[int], nums2: List[int]) -> List[int]:\n        d1 = set()\n        d2 = set()\n        c1 = c2 = 0\n\n        for i in nums1:\n            d1.add(i)\n\n        for i in nums2:\n            d2.add(i)\n            if i in d1:\n                c2+=1\n        \n        for i in nums1:\n            if i in d2:\n                c1 += 1\n\n        if c1 and c2:\n            return [c1, c2]\n        return [0, 0]\n\n\n\n```
['Ordered Set', 'Python3']