摘要: 题目描述:括号(小括号、中括号、大括号)的匹配 传送门:https://leetcode-cn.com/problems/valid-parentheses/ 解法:《数据结构》中作为例子引出栈的概念。用一个栈维护,从左到右扫描目标字符串,如果括号匹配,即满足三种情况: ①、s[i] == ')' 阅读全文
posted @ 2020-01-13 18:41 Peterxiazhen 阅读(206) 评论(0) 推荐(0) 编辑