C++ easy implementation || hash map || for beginners
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\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 minimumAddedInteger(vector<int>& nums1, vector<int>& nums2) {\n        \n        int n = nums1.size(),m=nums2.size();\n        unordered_map<int,int> m1 ,m3;\n         unordered_set<int> m2;\n        for(auto x:nums1)m1[x]++;\n        for(auto x:nums2)m3[x]++;\n\n            for(auto x:nums2){\n                for(auto c:nums1){\n                    m2.insert(x-c);\n                }\n            }\n    \n        int ans=INT_MAX;\n        for(auto x:m2){\n            bool b=0;\n            for(auto c:m3){\n                if(m1.find(c.first-x)==m1.end()){\n                    b=1;\n                    break;\n                }\n                else {\n                    if(m1[c.first-x]<m3[c.first]){\n                         b=1;\n                    break;\n                    }\n                }\n            }\n            if(b==0){\n                ans = min(ans, x);\n                }\n        }\n         return ans == INT_MAX ? -1 : ans;\n    }\n};\n```
['C++']