find-the-integer-added-to-array-ii - Brute force
Intuition\nGiven the limits check for every value between -1000 to 1000\n\n# Approach\nif value is not present increase count\nas there cann\'t be more than 2 n
# Intuition\nGiven the limits check for every value between -1000 to 1000\n\n# Approach\nif value is not present increase count\nas there cann\'t be more than 2 numbers not present\nif present decrease frequency in dictionary\n# Complexity\n- Time complexity:\nO(n*n)\n- Space complexity:\nO(n)\n\n# Code\n```\nclass Solution:\n    def minimumAddedInteger(self, a: List[int], b: List[int]) -> int:\n        \n        d = {}\n        n1 = len(a)\n        n2 = n1-2\n        for i in range(n2):\n            d[b[i]] = d.get(b[i], 0) + 1\n        for i in range(-1000, 1000):\n            copy = d.copy()\n            c = 0\n            for j in range(n1):\n                if(i+a[j] not in copy):\n                    c += 1\n                else:\n                    copy[i+a[j]] -= 1\n                    if(copy[i+a[j]] == 0):\n                        del copy[i+a[j]]\n                if(c > 2):\n                    break\n            else:\n                return i\n        return 1<<31\n        \n```
['Python3']