Python Simple O(N) Solution with explanation in comments
Code
\n# Code\n```python3 []\nclass Solution:\n    def getLargestOutlier(self, nums: List[int]) -> int:\n        # total_sums - outlier / 2 == sum_of_specials(s)\n        # if s in array then s is an outlier\n        # edge case where outlier == s, need to make sure there is more than 1 of that element, we will use a hash map to count\n\n        count_map = Counter(nums)\n        total_sum = sum(nums)\n        max_outlier = float(\'-inf\')\n\n        for num in nums:\n            #num is potential outlier\n            sum_of_specials = (total_sum - num) / 2\n            if sum_of_specials in count_map:\n                if sum_of_specials == num: #edge case scenario\n                    if count_map[num] > 1: \n                        max_outlier = max(max_outlier, num)\n                else:\n                    max_outlier = max(max_outlier, num)\n        \n        return max_outlier\n\n\n\n\n\n\n```
['Python3']