String window hashmap

2 test cases are not passing

hello @ayu2321
please explain ur approach.

I have made 2 arrays that will store the occurance of given string and pattern to b found and then i am iterating over the given string and taken a variable count and if count matches the length of pattern i am shrinking the window if an element is not there in the pattern or if extra frequecy of element is present in that window.
For more clarity i hav shared the code that i have written as well

@ayu2321
image

ur code is correct.
just u need to handle this->
if there is no valid string thrn print “No string”.

ur updated code->