20. Valid Parentheses
来源:互联网 发布:薛之谦男装淘宝店网址 编辑:程序博客网 时间:2024/06/08 04:58
题目摘要
给一个只含有”(“, “)”, “[“, “]”, “{“, “}”的字符串,判断括号合并顺序是否正确
解法
Stack
注意
* 奇数个字符肯定错误
原题
Given a string containing just the characters '('
, ')'
, '{'
, '}'
, '['
and ']'
, determine if the input string is valid.
The brackets must close in the correct order, "()"
and "()[]{}"
are all valid but "(]"
and "([)]"
are not.
Subscribe to see which companies asked this question
0 0
- LeetCode 20. Valid Parentheses
- [LeetCode] 20.Valid Parentheses
- LeetCode --- 20. Valid Parentheses
- LeetCode 20.Valid Parentheses
- [Leetcode] 20. Valid Parentheses
- 20.Valid Parentheses
- 20.Valid Parentheses
- 20. Valid Parentheses
- 【leetcode】20. Valid Parentheses
- [leetcode] 20.Valid Parentheses
- [leetcode] 20. Valid Parentheses
- 20. Valid Parentheses
- 20. Valid Parentheses
- 20. Valid Parentheses
- Leetcode 20. Valid Parentheses
- 20. Valid Parentheses LeetCode
- 20. Valid Parentheses
- 20. Valid Parentheses
- PE总结 – 资源表
- 167. Two Sum II - Input array is sorted
- 状态模式(State Pattern)
- C语言实例4——输入三个整数x,y,z,请把这三个数由小到大输出。
- App离线本地存储方案
- 20. Valid Parentheses
- Openstack 网络服务Neutron [五]
- AngularJS(六)_过滤器 |
- Redis基础学习
- 在IE浏览器报‘rowspan’为空或者不是对象错误
- 线程 join
- 使用Spring Data操作mongoDB
- 解决spring使用动态代理类型转换失败的问题--java.lang.ClassCastException: com.sun.proxy.$Proxy$ cannot be cast to ...今天
- TCP连接TIME-WAIT