longest valid parentheses, application of stack