simple solution || easy to understand
Code
# Code
```cpp []
class Solution {
public:
    int maximumSum(vector<int>& nums) {
        unordered_map<int,priority_queue<int>>mp;
        int ans=-1;
        for(auto &y:nums){
            int x=y;
            int sum=0;
            while(x){
                sum+=x%10;
                x/=10;
            }
            mp[sum].push(y);
        }
        for(auto &x:mp){
            if(x.second.size()==1) continue;
            int temp=x.second.top();
            x.second.pop();
            temp+=x.second.top();
            ans=max(ans,temp);
        }
        return ans;
    }
};
```
['Array', 'Hash Table', 'Sorting', 'Heap (Priority Queue)', 'C++']