Simple O(n) in Java
Code
# Code
```java []
class Solution {
    public int getLargestOutlier(int[] nums) {
        var total = Arrays.stream(nums).sum();
        var seen = new HashSet<Integer>();
        var outlier = Integer.MIN_VALUE;
        for (var i = 0; i < nums.length; i++) {
            // diff = outlier + sumOfSpecials || sum + sumOfSpecials || outlier + sum + (sumOfSpecials - nums[i])
            var diff = total - nums[i];
            // if nums[i] is the outlier
            if (diff % 2 == 0 && seen.contains(diff / 2)) {
                outlier = Math.max(outlier, nums[i]);
            } 
            
            // if num[i] is the sum
            if (seen.contains(diff - nums[i])) {
                outlier = Math.max(outlier, diff - nums[i]);
            }
            seen.add(nums[i]);
        }
        return outlier;
    }
}
```
['Java']