Minimum window substring concept

Hi sir
Suppose that we have found the largest subsrting in which the pattern fit, and we started contracting characters one by one from left and we contract a char that included in pattern ,so the pattern now is not fit in a substring , so we want now to expand new characters but no character is same the character that was part from pattern??
so will the solution will be same?

hello @mzk1994

logic will amost remain the same, but some implementation modification will be needed.
here they have discussed approach similar to yours pls check ->link

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.