easy to understand  c++
all steps according to hints\n\n# Code\n\nclass Solution {\npublic:\n    int minimumDeletions(string word, int k) {\n\n        unordered_map<char,int>m;\n\n    
all steps according to hints\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumDeletions(string word, int k) {\n\n        unordered_map<char,int>m;\n\n        for(auto &i:word)\n        m[i]++;\n\n        vector<int>freq;\n        for(auto i:m)\n        {freq.push_back(i.second);}\n\n         sort(freq.begin(), freq.end(), greater<int>());\n\n    int ans = INT_MAX; \n\n    for (int i = 0; i < freq.size(); i++) {\n      int num = freq[i]; \n      int cnt = 0;\n\n      for (int j = 0; j < freq.size(); j++) {\n        if (freq[j] - num > k) {\n          cnt += freq[j] - (num + k);\n        } \n        else if (num > freq[j]) {\n          cnt += freq[j];\n        }\n      }\n      ans = min(ans, cnt);\n      if (cnt == 0) {\n        break;\n      }\n    }\n    return ans;\n    }\n};\n```
['C++']