i was going through someone others code and i didn’t understood it,
can any one please explain it to me in detail
String window , conceptual doubt
Please provide the code in Coding Blocks IDE.
sir i have conceptual doubt how to go ahead in this problem , i mean what approach should be used
@vikashkmr519 to solve this problem you can use hash_map store the pattern in a hash_map,
1.Start matching the characters of pattern with the characters of string i.e. increment count if a character matches
Check if (count == length of pattern ) this means a window is found
2.If such window found, try to minimize it by removing extra characters from beginning of current window.
3.Update min_length
Print the minimum length window.
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.