# Given a string containing only three types of characters: '(', ')' and '*', # write a function to check whether this string is valid. We define the validity of a string by these rules: # 1. Any left ...
# find the length of the longest valid (well-formed) parentheses substring. # For "(()", the longest valid parentheses substring is "()", which has length = 2 ...