2013年12月3日

Substring with Concatenation of All Words

摘要: You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.For example, given:S:"barfoothefoobarman"L:["foo", " 阅读全文

posted @ 2013-12-03 21:36 waruzhi 阅读(231) 评论(0) 推荐(0) 编辑

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 阅读全文

posted @ 2013-12-03 18:54 waruzhi 阅读(238) 评论(0) 推荐(0) 编辑

导航