码迷,mamicode.com
首页 > Windows程序 > 详细

76. Minimum Window Substring

时间:2019-01-01 11:14:31      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:ini   bec   find   ret   which   adobe   example   rac   ant   

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).

Example:

Input: S = "ADOBECODEBANC", T = "ABC"
Output: "BANC"

Note:

  • If there is no such window in S that covers all characters in T, return the empty string "".
  • If there is such window, you are guaranteed that there will always be only one unique minimum window in S.
 

76. Minimum Window Substring

标签:ini   bec   find   ret   which   adobe   example   rac   ant   

原文地址:https://www.cnblogs.com/ruisha/p/10204143.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!