Given a string containing only (and ), find the length of the longest valid (well-formed) parentheses substring.
Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Example 1:Input: s = "(()"Output: 2Explanation: The longest valid ...