Longest Valid ParenthesesHardAcceptance Rate 32.8%Given a string containing just the characters "(" and ")", find the length of the longest valid (well-formed) parentheses substring.ExamplesExample 1Inputs = "(()"Output2Constraints0 <= s.length <= 3 * 10^4