String Window(Test cases)

Here is my code: https://ide.codingblocks.com/s/237531
Some of the test cases are failing in this. Please tell me what i am doing wrong.

Consider a case:
a b c derse qqw q e rety lorem ipsum wq . / \ ! fre
w f

Expected Output:
wq . / \ ! f

Your Output:
w

You can refer the approach from here String window problem

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.