leetcode 32:最長有效括號

一、 先對字符串進行遍歷  首先從前往後排除不配對的')' 首次遍歷後的字符串被分成若干個字符串  再對這些字符串 從後往前排除不配對的'(' int longestValidParentheses(std::string s) { std::stack<int> ss1; std::stack<char> ss2; std::stack<char> ss3; st
相關文章
相關標籤/搜索