[LeetCode] Minimum Window Subsequence 最小窗口序列
2021-04-18 23:25
标签:char contain bsp pre example lower multi occurs rac Given strings If there is no such window in Example 1: Note: s [LeetCode] Minimum Window Subsequence 最小窗口序列 标签:char contain bsp pre example lower multi occurs rac 原文地址:https://www.cnblogs.com/grandyang/p/8684817.htmlS
and T
, find the minimum (contiguous) substring W
of S
, so that T
is a subsequence of W
.S
that covers all characters in T
, return the empty string ""
. If there are multiple such minimum-length windows, return the one with the left-most starting index.Input:
S = "abcdebdde", T = "bde"
Output: "bcde"
Explanation:
"bcde" is the answer because it occurs before "bdde" which has the same length.
"deb" is not a smaller window because the elements of T in the window must occur in order.
S
will be in the range [1, 20000]
.T
will be in the range [1, 100]
.
上一篇:css 隐藏滚动条
文章标题:[LeetCode] Minimum Window Subsequence 最小窗口序列
文章链接:http://soscw.com/index.php/essay/76399.html