An Increment Problem Time : Space : 12345678910111213vector<int> Solution::solve(vector<int> &A) { unordered_map<int, set<int>> mp; for(int i = 0; i < A.size(); i++) { if(mp.count(A[i])) { auto b = *mp[A[i]].begin(); mp[A[i]].erase(b); A[b] += 1; mp[A[b]].insert(b); } mp[A[i]].insert(i); } return A;}