C++ Solution
Intuition\n Describe your first thoughts on how to solve this problem. \nUsing Sets\n# Approach\n Describe your approach to solving the problem. \n\n# Complexit
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUsing Sets\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximumSetSize(vector<int>& nums1, vector<int>& nums2) {\n        set<int>s1; set<int>s2;\n        for(auto i : nums1){\n            s1.insert(i);\n        }\n        for(auto i : nums2){\n            s2.insert(i);\n        }\n        int n = nums1.size();\n        int t1, t2 = 0;\n        if(n/2 > s1.size()) {\n            t1 = s1.size();\n        }else{\n            t1 = n/2;\n        }\n        if(n/2 > s2.size()) {\n            t2 = s2.size();\n        }else{\n            t2 = n/2;\n        }     \n\n        for(auto i : s2){\n            s1.insert(i);\n        }   \n        int temp = t1+t2;\n        if(s1.size() > temp) return temp;\n        return s1.size();\n        \n        \n    }\n};\n```
['C++']