DETAILED EXPLAINATION 
IntuitionFocus on 2 wrong elements , there will only be 2 elements then get the third valid element, that will be the minPossible diff x , between elementsAppro
# Intuition
Focus on 2 wrong elements , there will only be 2 elements then get the third valid element, that will be the minPossible diff x , between elements 

# Approach

When you sort both arrays, you are essentially pairing the smallest elements of nums1 with the smallest elements of nums2, the second smallest with the second smallest, and so on.

Hence sorting them helps .

Then if 2 invalid values (Worst case in the beginnning) , then lets handled that considering 3 starting elements 

that is atleast the 3rd element will satisfy :`(Condition of maintaining the constant difference int value b/w nums1 ele and nums2 ele)`

Then just get `diff with 1st ele of nums2`  as small-small & big-big pairing help manage consistent difference .

Validate diff1,2,3 , Which one gives atleast n-2 elements maintaining the difference in the elements of nums1 and nums2 

`j iterates over nums2` , and if `0->n-2` such elements found with maintaining the diff :`{nums2[j] - nums1[i] == diff `} in (3 difference ) then minimise the value of result with them

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

# Complexity
- Time complexity: O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

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

# Code
```java []
class Solution {
    public int minimumAddedInteger(int[] nums1, int[] nums2) {
        Arrays.sort(nums1);
        Arrays.sort(nums2);
        int ans = Integer.MAX_VALUE ;
        int[] diff = {nums2[0]- nums1[0] , nums2[0] - nums1[1] , nums2[0] - nums1[2]};

        int n = nums1.length ;
        for (int d : diff){
            int j = 0 , deleted = 0; 

            for (int i=0 ;i<n && j < n-2 ;i++){
                if (nums2[j] - nums1[i] != d){
                    deleted ++;
                }else {
                    j++;
                }
                if (deleted > 2){
                    break ;
                }
            }
            if (j == n-2){
                ans = Math.min(ans, d);
            }
        }
        
        return ans ;
    }
}
```
['Java']