Could not understand my mistake, failing testcase 2 and 7

please help me in finding the error in my code
link to the code https://ide.codingblocks.com/s/298060

In line number 16 you are jsut checking:
if(strmp[s[i]]<=mp[s[i]]){
cnt++;
}

Here if mp mp itself is 0. Then it will not be a valid move. So put a condition that when mp[s[i]]!=0 then you have to increase the count.

https://www.geeksforgeeks.org/find-the-smallest-window-in-a-string-containing-all-characters-of-another-string/ You can have a look at this code for reference.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.