Regarding the logic

I did not understand the logic applied

hello @Senjuti256 have you seen the prateek sir’s video on this topic ?
there must be one video of his explaining this question .
more or less i will also explain the same question but please just confirm here whether you have watched the video or not ?

hey @Senjuti256
1)First check if length of string is less than the length of given pattern, if yes then "no such window can exist ".
2. Store the occurrence of characters of given pattern in a hashtable
3. Start matching the characters of pattern with the characters of string i.e. increment count if a character matches
4. Check if (count == length of pattern ) this means a window is found
5. If such window found, try to minimize it by removing extra characters from beginning of current window.
6)Update min_length
7)Print the minimum length window.

you have to implement the same in code :
please let me know if you still have doubt ?
Happy Learning !!

hey @Senjuti256 have you understood the concept ?

perhaps I have understood

hello @Senjuti256 can you implement it in the code now ?
or do you need me to explain any logic ?

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.