C++ sort unordered map
```\nclass Solution {\npublic:\n    static bool comp(pair &a,pair &b)\n\t{\n        if(a.second==b.second)\n            return a.first>b.first;\n\t    return a.
```\nclass Solution {\npublic:\n    static bool comp(pair<int,int> &a,pair<int,int> &b)\n\t{\n        if(a.second==b.second)\n            return a.first>b.first;\n\t    return a.second<b.second;\n\t}\n    vector<int> frequencySort(vector<int>& nums) {\n        unordered_map<int,int> map{};\n        for(auto n:nums)\n            map[n]++;\n        vector<pair<int,int>> vec;\n        for(auto p: map)\n            vec.push_back(p);\n        sort(vec.begin(), vec.end(), comp);\n        \n        vector<int> ans{};\n        for(auto p: vec){     \n            while(p.second--)\n\t\t\t\tans.push_back(p.first);\n        }\n        return ans;\n    }\n};
['C', 'C++']