why is “qwerty as” not an answer? Even it has “qas” as substring
STRING WINDOW problem
And what are the time constraints??
He is supposed to find the minimum length substring of the string1 which contains all the characters of string2.
Time complexity shall be linear ie O(n).
1 Like
Time limit in general for any problem is 5 seconds??
Generally its 2 seconds.
2 or 5 wont matter much.
Constraint for this problem can be : length of strings is 10^7
So we need to implement it in linear time complexity
So , if the input size is of order 5-6 : O(nlogn)
if input size is of order 7-8 : O(n)
considering the fact that 1sec ~ 10^8 operations.
Is this correct??
Absolutely Correct
1 Like
You may close the thread if your doubt has been resolved. Please give a rating
1 Like