leetcode 32:最长有效括号

一、 先对字符串进行遍历  首先从前往后排除不配对的')' 首次遍历后的字符串被分成若干个字符串  再对这些字符串 从后往前排除不配对的'(' int longestValidParentheses(std::string s) { std::stack<int> ss1; std::stack<char> ss2; std::stack<char> ss3; st
相关文章
相关标签/搜索