2013年7月6日
摘要: 题目:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring. For"(()", the longest valid parentheses substring is"()", which has length = 2. Another example is")()())", where the lon 阅读全文
posted @ 2013-07-06 20:38 lichen782 阅读(4426) 评论(1) 推荐(0) 编辑
摘要: 题目: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", &qu 阅读全文
posted @ 2013-07-06 11:29 lichen782 阅读(1866) 评论(1) 推荐(0) 编辑