Easiest C++ Solution
Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\ncpp []\nclass Solution {\npublic:\n    int getLargestOutlier(vector<int>& nums) {\n  
# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int getLargestOutlier(vector<int>& nums) {\n        int ans = INT_MIN, total = 0;\n        unordered_map<int,int> mp;\n        for(auto it: nums){\n            mp[it]++;\n            total += it;\n        } \n        for(auto it: nums){\n            int currSum = total-it;\n            mp[it]--;\n            if(mp[it] == 0) mp.erase(it);\n            if(currSum%2 == 0 && mp.find(currSum/2) != mp.end() && it > ans){\n                ans = it;\n            }\n            mp[it]++;\n        }\n        return ans;\n    }\n};\n```
['Array', 'Hash Table', 'Math', 'C++']