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.
思路1:
利用栈
注意点:什么情况不正确,各种测试用例,vector容器得到最后元素使用back();
原文:http://www.cnblogs.com/lhxandcxy/p/5395437.html