String window problem

my code is running fine for maximum cases but i m not able to figure it out why it is not accepting two cases


Here, you can checkout my solution


This is the detailed explanation of it

i have done the same thing but one test case is not passing can you please help me in debugging that.

Try this: