Question is at this link-https://www.geeksforgeeks.org/check-possible-transform-one-string-another/
And I have written solution of this question which is-
string abbreviation(string a, string b) {
vector<int> alpha(124,0);
for(int i=0;i<a.size();i++)
alpha[a[i]]+=1;
for(int i=0;i<b.size();i++)
{
if(alpha[(b[i])])
alpha[(b[i])]-=1;
else if(alpha[tolower(b[i])])
alpha[tolower(b[i])]-=1;
else
return "NO";
}
for(int i=65;i<=90;i++)
{
if(alpha[i]>0)
return "NO";
}
return "YES";
}and it is failing for some test cases so please can anyone help to find test cases for it or why the approach is wrong.