Simple all possible ways C++ + Two pointer + Sorting ✅✅|Easy Solution ever
\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=nums1.size(),m=nums2.size(),mini=INT_MAX;\n        for(int i=0;i<n;i++){\n            for(int j=i+1;j<n;j++){\n                int l=0,diff=INT_MAX,flag=1;\n                for(int k=0;k<n;k++){\n                    if(k!=i && k!=j && l<m){\n                        if(diff==INT_MAX){\n                            diff=nums2[l]-nums1[k];\n                        }else{\n                            int temp=nums2[l]-nums1[k];\n                            if(diff!=temp){\n                                flag=0;\n                                break;\n                            }\n                        }\n                        l++;\n                    }\n                }\n                if(flag){\n                    mini=min(mini,diff);\n                }\n            }\n        }\n        return mini;\n    }\n};\n```
['Array', 'Two Pointers', 'Sorting', 'Enumeration', 'C++']