LeetCode 0032  Longest Valid Parentheses
Longest Valid Parentheses
Desicription
Given a string containing just the characters '('
and ')'
, find the length of the longest valid (wellformed) 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.
Solution

