Javascript | Hashmap | O(n)
Code
# Code
```javascript []
/**
 * @param {number[]} nums
 * @return {number}
 */
var getLargestOutlier = function(nums) {
    let T = 0;
    let res = -Infinity;
    const map = new Map();
    for(const num of nums){
        T += num;
        map.set(num, (map.get(num) || 0) + 1);
    }
    for(let i = 0; i < nums.length; i++){
        const outlier = T - nums[i] - nums[i];
        if(outlier == nums[i]){
            if(map.get(nums[i]) > 1){
                res = Math.max(res, outlier);
            }
        }
        else if(map.has(outlier)){
            res = Math.max(res, outlier);
        }
    }
    return res;
};
```
['JavaScript']