String window from Hashing

My code passes for 8 cases out of 10 cases. Why is it failing for 2 cases?

hello @div_yanshu07 wait for some time i will go through your code and let you know why your code is failing for some test cases .

hey @div_yanshu07 there is one edge case in the question .
i have made the correction in the code please try to submit now.


Happy Learning !!

No, still failing same number of cases.

@div_yanshu07 okay let me check again .

hey could you please share the question link of hackerblocks ?

please share the link i am unable to find this on hackerblocks i have to see the output format and the constraints .

https://hack.codingblocks.com/app/practice/1/363/problem

@div_yanshu07 thanks for the same .

hey @div_yanshu07 this is the correct code :


please go through the code .
you code was totally correct but there was just one silly mistake in printing in the case when you have to print no string .
i have commented the mistake there as well .
Happy Learning !!