✅ Easy C++ Solution || Beginner Friendly 📌📌📌
\n\n# Code\n\nclass Solution {\npublic:\n    int minimumAddedInteger(vector<int>& nums1, vector<int>& nums2) {\n        sort(nums1.begin(),nums1.end());\n      
\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumAddedInteger(vector<int>& nums1, vector<int>& nums2) {\n        sort(nums1.begin(),nums1.end());\n        sort(nums2.begin(),nums2.end());\n        int n=nums2.size();\n        int ans=INT_MAX;\n        for(int i=0;i<nums1.size();i++){\n            for(int j=i+1;j<nums1.size();j++){\n                unordered_set<int>a;\n                int p=0;\n                for(int k=0;k<nums1.size();k++){\n                    if(k==j || k==i){\n                        continue;\n                    }\n                    a.insert(nums2[p]-nums1[k]);\n                    p++;\n                }\n                if(a.size()==1){\n                    ans=min(ans,*a.begin());\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['Sorting', 'Simulation', 'C++']