LC: 727. Minimum Window Subsequence - spiralgo/algorithms GitHub Wiki
727. Minimum Window Subsequence:
The Essence:
We should narrow down the search space in the source string (s1) as much as possible.
For example:
We can find the first character of the target subsequence (s2) at some index near the beginning side of the source string (s1).
But, the same character may exist in another index near the ending side of the array. So we should keep trying to narrow down the search space in the source string as we iterate over the String characters from the beginning.
A similar situation goes for the last character of the target subsequence (s2).
Details:
For a more detailed explanation and implementations, please refer to: