Easy Solution C++ Greedy✅✅✅
\n\n# Code\n\nclass Solution {\npublic:\n\n    int minimumDeletions(string word, int k) {\n        int n = word.size();\n        map<char, int> mp;\n        for
\n\n# Code\n```\nclass Solution {\npublic:\n\n    int minimumDeletions(string word, int k) {\n        int n = word.size();\n        map<char, int> mp;\n        for (int i = 0; i < n; i++) {\n            mp[word[i]]++;\n        }\n        int i = 1, mini = n;\n        int j = min(i + k, n);\n        while (j <= n) {\n            int op = 0;\n            for (auto it : mp) {\n                if (it.second < i) {\n                    op += (it.second);\n                } else if (it.second > j) {\n                    op += (it.second - j);\n                }\n            }\n            mini = min(mini, op);\n            i++;\n            j++;\n        }\n        return mini;\n    }\n};\n```
['Hash Table', 'String', 'Greedy', 'Sorting', 'Counting', 'C++']