Easy Linear Time Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int getLargestOutlier(vector<int>& nums) {\n        int totalSum = accumulate(begin(nums), end(nums), 0);\n        unordered_map<int, int> numCount;\n        int answer = INT_MIN;\n\n        for (int val : nums)\n            numCount[val]++;\n\n        for (int val : nums) {\n            numCount[val]--;\n            int sum = totalSum - val;\n\n            if (sum % 2 == 0 and numCount[sum / 2] > 0)\n                answer = max(answer, val);\n\n            numCount[val]++;\n        }\n\n        return answer;\n    }\n};\n```
['C++']