added longestValidParentheses sol