priority_queue approach 
Intuition
Find the sum of digits.
Create an ordered_map of int and priority queue.
In priority queue, store all the numbers with same sum of digits.
Approach
Fo
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
* Find the sum of digits.
* Create an ordered_map of int and priority queue.
* In priority queue, store all the numbers with same sum of digits.

# Approach
<!-- Describe your approach to solving the problem. -->
* For each number in nums, compute its sum of digits.
Group Numbers by Their Digit Sum
* Use an `unordered_map<int, priority_queue<int>>` to store numbers with the same sum.
* Store numbers in a max-heap (priority queue) to keep track of the largest numbers efficiently.
* Extract the Two Largest Numbers.
* For each key in the map, check if there are at least two numbers. If yes, extract the two largest and compute their sum.
* Track the Maximum Sum and return it in the end.

# Complexity
- Time complexity: O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(n)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
private:
    int digits(int n) {
        
        int sum = 0;
        while(n > 0)
        {
            int d = n % 10;
            n /= 10;
            sum += d;
        }

        return sum;
    } 

public:
    int maximumSum(vector<int>& nums) {

        unordered_map<int, priority_queue<int>> container;

        for(int i:nums) {
            container[digits(i)].push(i);
        }

        int sum = -1;

        for(auto &[key,vec]:container) {
            if(vec.size() > 1) {
                int first = vec.top();
                vec.pop();
                int second = vec.top();
                sum = max(sum, first+second);
            }
        }
        
        return sum;
    }
};
```
['C++']