update solution for Longest Valid Parentheses