LeetCode: longest parentheses