Explained - using simple freq check
Approach\n- Find the frequency of each of the characters in word\n- Sort the freq array\n- Consider each of the freq as the minFreq possible and with this consi
# Approach\n- Find the frequency of each of the characters in word\n- Sort the freq array\n- Consider each of the freq as the minFreq possible and with this consideration we need to evaluate how many char from the higher frequency to be deleted to get the condition satisfied for all freq\n- Consider the next frequency as min and collect all lower freq count as deleted one and then again evaluate the hiher side freq deletion\n\n# Code\n```\nint minimumDeletions(string word, int k) {\n    vector<int> freq(26, 0);\n    int deleted = 0, ans = word.size();\n    for(auto c: word) freq[c-\'a\']++;             // find frequency of each chars\n    sort(freq.begin(), freq.end());              // sort the freq array\n    for(int i = 0; i < freq.size(); ++i){        // Iterate over freq \n        int res = deleted, minFreq = freq[i];    // consider the current freq as the min freq after deletion. Also add the already deleted freq to temporary result\n        for(int j = freq.size()-1; j > i; --j){  // iterate over freq array to evaluate the chars to be deleted from the higher freq side of the freq array\n            if(freq[j] - minFreq <= k) break;    // Once condition is satisfied then exit from the loop\n            res += freq[j] - minFreq - k;        // accumulate on the result - number of items to be deleted\n        }\n        ans = min(ans, res);                     // keep tracking the min possible value\n        deleted += freq[i];                      // update the deleted freq with current freq\n    }\n    return ans;\n}\n```\n\n\n---\n\n<b> Here is an article of my last interview experience - A Journey to FAANG Company, I recomand you to go through this to know which all resources I have used & how I cracked interview at Amazon:\nhttps://leetcode.com/discuss/interview-experience/3171859/Journey-to-a-FAANG-Company-Amazon-or-SDE2-(L5)-or-Bangalore-or-Oct-2022-Accepted\n\n---
['C++']