摘要: 记录最长的没匹配右括号的左括号 class Solution { public: int maxDepth(string s) { int d = 0; int ans=0; for (char c : s){ if (c == '(') { ++d; ans = max(ans, d); } el 阅读全文
posted @ 2020-10-11 13:28 CrosseaLL 阅读(59) 评论(0) 推荐(0) 编辑