摘要: 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 lo 阅读全文
posted @ 2012-09-21 04:47 ETCOW 阅读(387) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1. 阅读全文
posted @ 2012-09-21 04:09 ETCOW 阅读(399) 评论(0) 推荐(0) 编辑