Problem
Given a string containing just the characters'(' and ')', return the length of the longest valid (well-formed) parentheses substring.
Examples
Constraints
- 0 <= s.length <= 3 * 10^4
s[i]is'(', or')'.
Tested Python solution for LeetCode 32 with 16 pytest cases. Generate a practice environment with lcpy.
'(' and ')', return the length of the longest valid (well-formed) parentheses substring.
s[i] is '(', or ')'.