Hasp Map Solution
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```cpp []\nclass Solution {\npublic:\n    int minimumDeletions(string word, int k) {\n        int ans = INT_MAX, cnt;\n        vector<int> freq(26, 0);\n        for (char ch : word) {\n            freq[ch - \'a\']++;\n        }\n        for (auto num : freq) {\n            if (num) {\n                cnt = 0;\n                for (int index = 0; index < 26; index++) {\n                    if (freq[index] < num) {\n                        cnt += freq[index];\n                    } else if (freq[index] > (num + k)) {\n                        cnt += freq[index] - (num + k);\n                    }\n                }\n                ans = min(ans, cnt);\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']