JavaScript:实现最长有效括号算法 /* */ export const longestValidParentheses = (s) => { const n = s.length const stack = [