# Minimum Window Substring（最小覆盖子串）【面试算法题】

pi9nc 分享于 2013-09-27

1.把二元查找树转变成排序的双向链表  题目： 输入一棵二元查找树，将该二元查找树转换成一个排序的双向链表。 要求不能创建任何新的结点，只调整指针的指向。

### leetcode：Minimum Window Substring（最小覆盖子串）【面试算法题】

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).

For example,
S = `"ADOBECODEBANC"`
T = `"ABC"`

Minimum window is `"BANC"`.

Note:
If there is no such window in S that covers all characters in T, return the emtpy string `""`.

If there are multiple such windows, you are guaranteed that there will always be only one unique minimum window in S.

,

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).

For example,
S = `"ADOBECODEBANC"`
T = `"ABC"`

Minimum window is `"BANC"`.

Note:
If there is no such window in S that covers all characters in T, return the emtpy string `""`.

If there are multiple such windows, you are guaranteed that there will always be only one unique minimum window in S.

,思路：滑动i,j直到num =s的长度，然后根据队列中的值去移动i，和更新count ,num  ，minvalue,

leetcode：Minimum Window Substring（最小覆盖子串）【面试算法题】 分类：  leetcode面试算法题 2013-09-27 02:29  305人阅读  评论(0)  收藏  举报 leetcode Minimum Window Substring 最小

×
• 登录
• 注册

×

### 请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品，请激活账号。

您的注册邮箱： 修改

如果您没有收到激活邮件，请注意检查垃圾箱。