2-Pass
Intuition: the value is either:\n1. n2[0] - n1[2] if we remove first 2 elements, or\n2. n2[0] - n1[1] if we remove the first element, or\n3. n2[0] - n1[0].\n\nB
**Intuition:** the value is either:\n1. `n2[0] - n1[2]` if we remove first 2 elements, or\n2. `n2[0] - n1[1]` if we remove the first element, or\n3. `n2[0] - n1[0]`.\n\nBecause both arrays are sorted, the smallest value is for option 1. So, for the first two options, we match the rest of the array.\n\nIf there is a mismatch, we skip that element, incrementing `skip`. If we match the entire array and `skip < 3`, we return the value.\n\nIf we could not match the array for option 1 and option 2, the result is option 3.\n\n**C++**\n```cpp\nint minimumAddedInteger(vector<int>& n1, vector<int>& n2) {\n    sort(begin(n1), end(n1));\n    sort(begin(n2), end(n2));\n    for (int i = 2; i > 0; --i) {\n        int skip = i;\n        for (int j = i + 1; skip < 3 && j - skip < n2.size(); ++j)\n            skip += n2[j - skip] - n1[j] != n2[0] - n1[i];\n        if (skip < 3)\n            return n2[0] - n1[i];\n    }\n    return n2[0] - n1[0];\n}\n```\n**Complexity Analysis**\n- Time: O(sort)\n- Memory: O(sort)
['C']