I TRIED A LOT BUT NHI HO RHA CODE CAN U GIVE THE CODE OF THIS QNS
String window qns
Try to follow this :
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 hash_pat[].
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.
If you are still unable to code this algorithm, please have a look at this implementation.
sir i m not able to understand ur code line by line pliz help
There are comments written everywhere still you are asking for line by line explanantion?
You aren’t going to get spoonfeeded.
I have told you the algorithm, implement yourself. My code is just for reference.
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.