2
=> Take two map, one to store frequency of target, and another for sentence. 3
=> Traverse over the mp(frequency of target ) and calculate the minimum frequency ratio 4
mn = min(mn , frequency of a char in sentance / frequency of same char in target) ;6
Space : O(n) Time : O(n) class Solution {8
int rearrangeCharacters(string s, string target) {9
unordered_map<char, int> targetFreq;10
for (auto a : target) {13
unordered_map<char, int> sentFreq;18
for (auto a : targetFreq) {19
mn = min(mn, sentFreq[a.first] / a.second);