[LeetCode]39. Longest Valid Parentheses最长有效括号对

待补充。

 

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 longest valid parentheses substring is "()()", which has length = 4.

 

posted @ 2015-10-24 18:20  AprilCheny  阅读(147)  评论(0编辑  收藏  举报