Add solution for 'longest valid parentheses'.