Aditya Verma Approach || Easy to understand
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> frequencySort(vector<int>& nums) {\n        unordered_map<int,int> m;\n        for(auto it : nums) m[it]++;\n\n        priority_queue<pair<int,int>> h; \n        for(auto &i:m) h.push({-i.second,i.first});\n        \n        vector<int> v;\n        while(!h.empty())\n        {\n            for(int i = 0; i<-(h.top().first); i++)\n            {\n                v.push_back(h.top().second);\n            }\n            h.pop();\n        }\n        return v;\n    }\n};\n```
['C++']