longest valid parenthese.
add the comment and optimize.