Sort and Search 
IntuitionApproachComplexity

Time complexity:
O(2000 * n)


Space complexity:

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
O(2000 * n)

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```javascript []
/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number}
 */
var minimumAddedInteger = function(nums1, nums2) {
    nums1.sort((a,b)=>a-b)
    nums2.sort((a,b)=>a-b)
    let start = -1000
    let count = 0
    while(start <= 1000){
        rem = 2
        let p = 0
        let broke = false
        for(let i = 0 ; i < nums1.length ; i++){
            if(nums1[i] + start === nums2[p]){
                p++
                continue
            }else{
                if(rem){
                    rem--
                    continue
                }else{
                    broke = true
                    break
                }
            }
        }
        if(!broke){
            return start
        }
        start++
    }
};
```
['JavaScript']