Simple set operations, symmetric difference
\n\n# Code\npython\nclass Solution:\n    def maximumSetSize(self, nums1: List[int], nums2: List[int]) -> int:\n        s1 = set(nums1)\n        s2 = set(nums2)\
\n\n# Code\n```python\nclass Solution:\n    def maximumSetSize(self, nums1: List[int], nums2: List[int]) -> int:\n        s1 = set(nums1)\n        s2 = set(nums2)\n        n = len(nums1)\n        inter = s1.intersection(s2)\n        ex1 = min(len(s1) - len(inter) , n//2)\n        ex2 = min(len(s2) - len(inter) , n//2)\n        return (min(ex1 + ex2 + len(inter) , n))\n```
['Python3']