Easy C++ Solution ✅✅
Code\n\nclass Solution {\npublic:\n    int maximumSetSize(vector<int>& nums1, vector<int>& nums2) {\n        unordered_set<int> s;\n        int n1=nums1.size();
# Code\n```\nclass Solution {\npublic:\n    int maximumSetSize(vector<int>& nums1, vector<int>& nums2) {\n        unordered_set<int> s;\n        int n1=nums1.size();\n        int n2=nums2.size();\n        for(int i=0;i<n1;i++){\n            s.insert(nums1[i]);\n        }\n        int use1=s.size();\n        s.clear();\n        for(int i=0;i<n2;i++){\n            s.insert(nums2[i]);\n        }\n        int use2=s.size();\n        s.clear();\n        for(int i=0;i<n1;i++){\n            s.insert(nums1[i]);\n        }\n        for(int i=0;i<n2;i++){\n            s.insert(nums2[i]);\n        }\n        int use3=s.size();\n        return min(use3,min(n1/2,use1)+min(n2/2,use2));\n        \n    }\n};\n```
['C++']