
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use two pointers to create a window of letters in s, which would have all the characters from t.
Expand the right pointer until all the characters of t are covered.
Once all the characters are covered, move the left pointer and ensure that all the characters are still covered to minimize the subarray size.
Continue expanding the right and left pointers until you reach the end of s.