Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.
Click Run to execute sample tests.